[Israel.pm] newline character as a portability issue

Dovalle Yankelovich dovalle at smlink.com
Wed Jul 7 23:32:30 PDT 2004

\015 and \012 are switches and that was your original problem - you are
trying to use switches (no matter if you use '\n' or '\015\012')
in addition - do you know what is \012 \015??? Open your calculator type
(on decimal) 10 and toggle between oct, hex and dec do it again with 13
I think you will get it


-----Original Message-----
From: Shlomo Yona [mailto:shlomo at cs.haifa.ac.il] 
Sent: Thursday, July 08, 2004 06:50
To: Perl in Israel
Subject: RE: [Israel.pm] newline character as a portability issue

On Thu, 8 Jul 2004, Dovalle Yankelovich wrote:

> I think the ASCII codes 13, 10 (carriage return and new line
> respectively) should be 'cross platform', so instead using shorts
> as '\n') add these 2 chars to your output.

This probably isn't exactly accurate.
perldoc perlport also mentions \015 and \012...

So -- apparently, this is indeed something which requires
some general handling rather than simply betting on the
correct character...

Shlomo Yona
shlomo at cs.haifa.ac.il
Perl mailing list
Perl at perl.org.il

More information about the Perl mailing list