[Israel.pm] newline character as a portability issue
jason.friedman at weizmann.ac.il
Thu Jul 8 03:51:18 PDT 2004
IO::nline package on CPAN is what you are looking for:
>From the page:
"This layer translates any of \r, \n or \r\n into \n on input, and into
\r\n on output. It is probably a bad idea to mix it with :crlf on one
filehandle: in particular, under DOSish systems it is definitely a good
idea to push :raw before you start."
It may not handle the more obscure variants mentioned on the list
however . . .
Disclaimer: I never used this package.
> Bottom line...
> say I have a regex pattern:
> and I want this to be portable across systems (I have no
> knowledge of the text I'm receiving as input) what should
> stand instead of \n in the pattern?
> How can I make this platform dependent?
> Shlomo Yona
> shlomo at cs.haifa.ac.il
> Perl mailing list
> Perl at perl.org.il
Department of Computer Science and Applied Mathematics
Weizmann Institute of Science, Rehovot, Israel.
Home page: http://www.wisdom.weizmann.ac.il/~jason
More information about the Perl