printing download header and streaming data out...
- Hi guys..
I have searched the net in vain for the answer to this question, or even
just some format info.. but came up mostly blank..
I have an dbi/cgi::app script that has a download button.. when clicked I
want it to print out a download header followed by a csv file of data..
(from a mysql DB actually)
The file doesn't exist.. I figured I could just stream the data out live
after the header rather then save go to the hassle and script slowdown of
creating the file...
I am playing with this code:
my $csv_data = 'client_transactions.csv';
my $csv_output = $self->header_props(-type=>'application/ms-excel',
-attachment => $csv_data);
Which does indeed start a download.. but I have no idea how to steam the
I don't even want it to open in excel, I just want to save the file with a
normal "save as" file dialog..
not sure how to go about it, or even how to look for info..
I'd really appreciate any info you guys could provide..