Re: carriage return & line feeds
Re: carriage return & line feeds
- Subject: Re: carriage return & line feeds
- From: Paul McCann <email@hidden>
- Date: Fri, 08 Jun 2001 18:40:51 +0930
Chris Nebel wrote:
>
Mac OS: ASCII character 13 (aka "\r", aka carriage return)
>
Unix: ASCII character 10 (aka "\n" to Perl and C users, aka line feed)
>
Windows: ASCII character 13 & ASCII character 10 (aka "\r\n", aka crlf)
Hey, you leave Perl out of this!
(Forgive me if I'm misreading your implication in the above, but just to try
and clarify things a little: "\n" is platform *dependent* in Perl, and
adjusts itself nicely when reading/writing files on mac/unix/windows. Very
helpful for writing platform *independent* scripts involving file I/O. "\n"
is ascii character 10 in Perl only on unix platforms. So each of your three
lines should contain an entry something like:)
('aka "\n" to Perl users on this platform')
Cheers,
Paul