Perl hasn't behaved that way for 6.5 years.
>perl -e"print qq{abc\n\cZdef\n}" | c:\progs\perl560\bin\perl -e"while + (<>) { chomp; print qq{[$_]\n} }" [abc] >perl -e"print qq{abc\n\cZdef\n}" | c:\progs\perl561\bin\perl -e"while + (<>) { chomp; print qq{[$_]\n} }" [abc] >perl -e"print qq{abc\n\cZdef\n}" | c:\progs\perl580\bin\perl -e"while + (<>) { chomp; print qq{[$_]\n} }" [abc] [→def] >perl -e"print qq{abc\n\cZdef\n}" | c:\progs\perl588\bin\perl -e"while + (<>) { chomp; print qq{[$_]\n} }" [abc] [→def] >perl -e"print qq{abc\n\cZdef\n}" | c:\progs\perl5100\bin\perl -e"whil +e (<>) { chomp; print qq{[$_]\n} }" [abc] [→def]
Time to upgrade!
5.8.0 is when PerlIO started being used (by ActiveState, at least). Under PerlIO, files are read in "as binary", then they are "converted to text" by the crlf layer if present. The crlf layer doesn't treat chr(26) specially like the old library did.
Note: → represents character 26.
In reply to Re: Weird Character in File Makes Perl Think it's EOF
by ikegami
in thread Weird Character in File Makes Perl Think it's EOF
by davemabe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |