[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] \n\r vs \012\015 question



At 04.45 1998.04.09, Andy White wrote:
>Version 5.1.9:
>
>How come
>s/\n/\r/
>works to change LF to CR, but

I hope that doesn't work on your Mac (it doesn't on mine).  In MacPerl, \n
is CR and \r is LF.  "\n" means "local newline", which in Mac OS is \015.
So "\r" is made into \012.

>s/\r/\n/
>doesn't do the reverse (ie for changining mac/unix files) If I use
>\012 and \015 the replace works both ways...

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])
#==               New Book:  MacPerl: Power and Ease               ==#
#==    Publishing Date: Early 1998. http://www.ptf.com/macperl/    ==#



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch