|
|
| We don't bite newbies here... much | |
| PerlMonks |
Re: Native newline encodingby Anonymous Monk |
| on May 22, 2012 at 21:30 UTC ( #971882=note: print w/ replies, xml ) | Need Help?? |
|
You probably really shouldn't do any detecting :) You should be liberal in what you accept s/[\r\n]+$//; and be strict in what you output binmode $fh, '...:crlf'; See also File::LocalizeNewlines and Encode::Newlines, PerlIO::eol and Devel::CheckOS
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||