[Israel.pm] newline character as a portability issue
offer.kaye at gmail.com
Thu Jul 8 00:01:09 PDT 2004
On Wed, 7 Jul 2004 19:27:26 +0300 (IDT), Shlomo Yona
<shlomo at cs.haifa.ac.il> wrote:
> I have a script which does some manipulation to texts.
> This script assumes that '\n' is the newline character.
> I wonder how I can make the script more robust across
> platforms, regarding newline characters.
As long as you refer to "\n", you're okay. What I mean is, as long as
you use "chomp" to remove the line ending and "print '$text\n'" to add
the line ending, you are using portable code.
If you are trying to do other stuff, please say what exactly.
More information about the Perl