Sorry, this is rather a comment than an answer. I'd like to come back on your $nl = "\r\n". HTTP specs want you to use CR+LF to end your lines. Your code works fine as long as your webserver runs on Un*x. If you try and run it on a Win32 machine (<troll>but why on earth would you do that? ;-) </troll>), then Perl will helpfully turn your \n into a CR+LF sequence, to adapt to the local custom. And you end up with CR+CR+LF, which is not exactly what you want.
So when dealing with a network protocol where ASCII values are important, \r\n should be written \015\012, be it only for the sake of portability.
--bwana147
In reply to Re: How to download data from a table in Sybase and save the data in text file format using Perl?
by bwana147
in thread How to download data from a table in Sybase and save the data in text file format using Perl?
by rcsyee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |