in reply to How the perl converts LF into CRLF
If you don't want to do it manually, but want to understand how Perl does it, read perlport and perlio.
One simple option is to call binmode on the filehandle on the win32 machine to disable automatic CR/LF translation and then everything will stay with LF for line endings. (Note this will cause issues for UTF-8, so if you're worried about that, you will need to read about the various IO layers described in perlio.)
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
|
|---|