Ever since perl 5.004 the code:
while ($line = <FH>)has an implicit defined check, so that it's actually:
while (defined($line = <FH>))This was because, prior to this, that code would emit a warning; it was a common enough desire that perl was simply modified to accept it as intended.
Also, while it is possible for a line to have "0" on it, with no newline, it isn't possible for <FH> to return "" unless it's tied.
In reply to Re^2: Using null filehandle
by Somni
in thread Using null filehandle
by digger
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |