> -----Original Message----- > From: Dave Benware [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 30, 2002 8:50 AM > To: [EMAIL PROTECTED] > Subject: What is the newline character (\n) equal to? > > > Correct me if I'm wrong, the newline character \n is > platform dependent. On unix-type it would equal a LF > and on Windows it would equal a CRLF.
No. A "\n" in your program is an ASCII linefeed (10) character on either platform. What happens on Windows is that when you are reading a file, each CR/LF pair from the file is changed to a single LF char before the data is returned to you. On output, the situation is reversed (LF is translated to CR/LF pair). On UNIX, no such translation is done. On Windows, if you don't want this translation done, you need to call binmode(). All the poop can be found at: perldoc -f binmode -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]