But cygwin and windows are different OS, they have different defaults for \n, and you need to deal with them.
Read binmode, read perlport#Newlines, and deal with the newlines
- eol
- EOL - This module aids in the conversion of text file newline characters within the context of other perl code; includes command line executable.
- PerlIO::eol - PerlIO layer for normalizing line endings
- Text::FixEOL - Canonicalizes text to a specified EOL/EOF convention, repairing any 'mixed' usages
- s/\s+$//;
- newline
- Encode::Newlines
- File::LocalizeNewlines
- ?node_id=3989;HIT=newline;re=N, ?node_id=3989;HIT=\n;re=N
- Quick and portable way to determine line-ending string?
- \r\n at end of line
- use
- s/\s+$//;
- don't
- dos2unix, its silly to use it between cygwin and windows :)