in reply to Perl Windows vs Cygwin installs

just use \n perl deals with it automatically based on your os. i don't worry about it. only use \r\n if you're working with sockets

--linuxkid


imrunningoutofideas.co.cc

Replies are listed 'Best First'.
Re^2: Perl Windows vs Cygwin installs
by Ralesk (Pilgrim) on Mar 23, 2012 at 22:57 UTC

    No.

    \n will mean 0x0D 0x0A in a CR LF environment (DOS), 0x0D in a CR environment (Mac Classic), and 0x0A in a NL environment (pretty much everything else). You mean \015\012 (or \x0d\x0a if you’re a hexed person) when dealing with sockets, but even that’s not true, because it’s 0x0D 0x0A only in protocols that define new lines as a CR LF sequence. Even so, most of the time, receiving NL-separated messages in such protocols is generally okay, as per “(Be strict in what you send), but forgiving in what you receive”.

Re^2: Perl Windows vs Cygwin installs
by Anonymous Monk on Mar 23, 2012 at 22:59 UTC