in reply to Testing filehandles
construct is magical. Perl sees that, and does something like this:while (<FH>) { ... }
Thus, usewhile (defined ($_ = <FH>)) { ... }
to properly emulate this behavior. Also, I believe that use warnings would have detected improper use of numeric comparison, mate.while (($_ = <STDIN>) ne "\n"){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Testing filehandles
by Anonymous Monk on Jan 03, 2004 at 22:49 UTC |