"perl -p" uses <> not <STDIN> so your binmode STDIN does nothing (or at least happens too late, I'm not going to bother to swap in the exact details right now).
> perl -e "binmode STDIN; binmode STDOUT; while(<STDIN>){ chomp $_; p +rint }" <win32.txt >win32.out > od -c win32.out 0000000 l i n e o n e \r l i n e t +w 0000020 o \r 0000022
- tye
In reply to Re^8: different length of a line from linux and windows textfile? (STDIN)
by tye
in thread different length of a line from linux and windows textfile?
by Microcebus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |