punch_card_don has asked for the wisdom of the Perl Monks concerning the following question:
After generating a csv file with my Perl script, I want to download it to the client. No problem, you say, just use http headers:
Which I've done, and the file does download, BUT, the filename is given as the name of the Perl script file, not the filename I set, my_file.csv.print "Content-type: text/csv"; print "Content-Disposition: attachment; filename=my_file.csv\n\n";
What silly thing have I forgotten?
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Output CSV-file, can't get filename recognized.
by moritz (Cardinal) on Jan 30, 2008 at 18:54 UTC | |
by punch_card_don (Curate) on Jan 30, 2008 at 19:14 UTC | |
by moritz (Cardinal) on Jan 30, 2008 at 19:25 UTC |