I think you missed his point, if not the point of the whole meditation. The behavior you cite from the docs did not exist in 5.004_04. The fact that it didn't could result in some obscure bugs. I pointed out two ways you could run into trouble because of it. And theorbtwo was trying to point out another one. (He was wrong, but only because setting $/ to a reference to a number in order to read fixed length records was not supported in 5.004_04.)
You can test if you need convincing and you have perl 5.004_04 ;-)
And if you need some evidence that the documentation you pasted is irrelevant to the case at hand:$ perl5.00404 -e '$/=\1; print "[$_]" while <>;' abcd 0000 ^D [abcd 0000 ]$
$ perl5.00404 -we'$/="0"; print $l while ($l = <>)' Value of <HANDLE> construct can be "0"; test with defined() at -e line + 1. foo000bar foo0$
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Re: To Kill a Meme: while(defined($line = <>))
by sauoq
in thread To Kill a Meme: while(defined($line = <>))
by sauoq
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |