http://www.perlmonks.org?node_id=853690


in reply to File Reading and Closing confusion

What I am confused about is when in a loop I have something like while(<FH>){...}, is this any different than $line=<FH> or are these granularly the same?

while (<FH>) is transformed into while (defined($_ = <FH>)).

Yes, $_=<FH> has the same granularity as $line=<FH>, whatever that means.