in reply to Native newline encoding
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
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Native newline encoding
by salva (Canon) on May 23, 2012 at 08:53 UTC | |
Re^2: Native newline encoding (more liberal)
by tye (Sage) on May 23, 2012 at 02:52 UTC | |
by Anonymous Monk on May 23, 2012 at 03:54 UTC |
In Section
Seekers of Perl Wisdom