in reply to Re^2: Changing CRLF in Windows to LF for UNIX
in thread Changing CRLF in Windows to LF for UNIX

You should use 3 arg open FILEHANDLE,MODE,EXPR. I tried out the code and it does work for me.

>> I'm coding in Windows (Windows 10) and trying to change a Windows created text file that ends in CRLF to just LF, so that I can upload the file and process it on a Unix-based site.

If you are running the script in Windows, it will happen since when you open for write (without binmode or :raw or :unix), Perl will perform '\n' to (Windows) platform '\r\n'.

  • Comment on Re^3: Changing CRLF in Windows to LF for UNIX