in reply to Re^2: Remove new line characters from PCL file
in thread Remove new line characters from PCL file
I'm guessing here... I'm guessing that this is a Win32 issue, and the '.dat' file is binary, not text...
...in which case the problem could be: by default Perl, when reading by <$FILE> will replace CRLF pairs by LF -- irrespective of the state of $/. print will do the inverse on output.
To avoid this you can: open $FILE, '<:raw', ... ; or open $FILE, '<', ... ; binmode($FILE) ;, for input and similarly for output. (See binmode and open.) Or you can use read (read), or for deeper magic, sysread (sysread).
|
|---|