Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I was trying to download a file using my CGI script, it's geting downloaded but I am not getting the actual file content ... means after saving the file ... when I open it I don't see the actual content .. instead I see the converted html of my script written into the file.Below is the code
print $cgi->header(-type=>'application/octet-stream',-expires=>'+2m',- +charset=>'UTF-7',-attachment=>'booklist.csv'); print $cgi->start_html(); print $cgi->b("Thanks for downloading the file"); print $cgi->end_html();
I am using perl on windows and IE browser. Any idea why it's behaving so? Thanks for your help in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: downloading file with CGI
by almut (Canon) on Dec 02, 2009 at 19:38 UTC | |
by Anonymous Monk on Dec 02, 2009 at 19:55 UTC | |
by almut (Canon) on Dec 02, 2009 at 20:05 UTC | |
|
Re: downloading file with CGI
by zentara (Cardinal) on Dec 03, 2009 at 13:08 UTC | |
by Anonymous Monk on Dec 03, 2009 at 14:37 UTC |