in reply to Re^4: Array Processing
in thread Array Processing
And of course, it becomes essential when reading in a file, which could contain blank lines
Actually, no, Perl DWIMs this.
$ perl -MO=Deparse,-x7 -e'while($line=<$fh>){}'
while (defined($line = <$fh>)) {
();
}
-e syntax OK
But defined doesn’t help you in this case anyway, since undef is a legal value for an array element.
Makeshifts last the longest.
|
|---|