in reply to Re^2: File Reading and Closing confusion
in thread File Reading and Closing confusion
With $line=<FH>, we need to check for defined-ness.
No. While there are lines read, they are defined since they have $/ attached. If $/ is undef, no point for while, since that's slurp mode. An empty string on the last line with no $/ is - no line.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: File Reading and Closing confusion
by repellent (Priest) on Aug 09, 2010 at 03:49 UTC | |
by shmem (Chancellor) on Aug 09, 2010 at 09:30 UTC | |
by repellent (Priest) on Aug 09, 2010 at 15:37 UTC |
In Section
Seekers of Perl Wisdom