If you want OS sensitive line breaks in DATA you'll need to translate them.
I'd suggest using plain "enter" in the input and
$output = join "\n", <DATA>
In case of OS problems when reading DATA by line, just adjust $/ before. (Never happened to me *)
> Is that what you mean?
I suggested using HERE-docs instead of DATA. They are per default interpolated.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
*) actually, this problem can't arise, because Perl reads DATA like it's own code, its the same filehandle. I.e. the script won't run if there where any problems with OS specific line-endings
In reply to Re^3: Can't get \n or other character/translation escapes to interpolate if originally read from a data file
by LanX
in thread Can't get \n or other character/translation escapes to interpolate if originally read from a data file
by davebaker
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |