If that is a normal DOS text file and your trick worked, then the output should include "0d0a" not just "0a".
Perhaps you should double check that the binmode took effect and post your evidence.
You pretty much have to get the perl excutable to do the binmode for you since <> doesn't open the file until it also reads the first line from the file, so Perl scripting code has no way to insert a call to binmode between the implicit open and the reading.
This is a perfect use for open.pm, except it doesn't work with <> (unless that has been fixed recently).
- tye
In reply to Re^2: binmode(STDIN) (testing)
by tye
in thread binmode(STDIN)
by PhilHibbs
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |