in reply to How to download data from a table in Sybase and save the data in text file format using Perl?
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: How to download data from a table in Sybase and save the data in text file format using Perl?
by tye (Sage) on Jun 11, 2001 at 20:57 UTC |