in reply to Binary File Load error?
In Windows,
Not using binmode on the input handle will cause the convertion of CRLF to LF.
Not using binmode on the output handle will cause the convertion of LF to CRLF.
So while $content contained an identical copy of the file, print was converting all LFs to CRLFs.
The output handle is STDOUT in this case, so just add binmode STDOUT; before the print to fix the problem.
|
|---|