in reply to Re: Print in TXT (while loop)
in thread Print in TXT (while loop)
Like this ...
for ( ; my $in = <$fh> ; ) { ... } # or ... for ( ;; ) { last if eof $fh; my $in = <$fh>; ... }
... ? The first case is very much like while with the additions of empty initialization & increment statements both of which happened to be covered by the loop end condition. So all you gain is obfuscation with for loop in this case.
|
---|