bwana147 has asked for the wisdom of the Perl Monks concerning the following question:
In a recent thread, I was thinking about (and was probably not the first to do so) the issue of \n being conveniently interpreted in several ways depending on the platform perl runs on (i.e. LF on Unices, CR on MacOS, CR+LF on DOS/Windows...). Convenient when dealing with text files but just plain annoying when you want to deal with some network protocol that demand a CR+LF as a line delimiter although they deal mostly with text (like, e.g., SMTP).
Then tye accurately pointed out that specifying \015\012 wouldn't prevent perl from inserting another \015 when running on Windows.
So what shall we do?
Thanks for your time and enlightened remarks.
--bwana147
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: binmode, CR, LF
by tadman (Prior) on Jun 14, 2001 at 16:54 UTC | |
|
Re: binmode, CR, LF
by bikeNomad (Priest) on Jun 14, 2001 at 20:30 UTC | |
|
(tye)Re: binmode, CR, LF
by tye (Sage) on Jun 14, 2001 at 20:58 UTC |