Unanswered: How to create a csv file on the fly in Perl?
How can I use perl to generate and send csv's on the fly? I've seen php examples, but can't get them ported properly to perl. Any help is greatly appreciated.
I got it to work with this code and no modules at all:
print "Content-type: application/msexcel\n";
print "Content-disposition: inline; filename=\"test.csv\"\n";
print "Pragma: no-cache\n";
print "Expires: 0\n\n";
The simple key was to not double-break (\n\n) until I finished printing the headers.