in reply to Re^2: Advantage of while(<>){while()}?
in thread Advantage of while(<>){while()}?

Oh, I didn't notice that you added local $/; to the first snippet too!

local $/; while (<>) provides error checking (empty file, read error) that local $/; $_ = <>; doesn't.

Replies are listed 'Best First'.
Re^4: Advantage of while(<>){while()}?
by Argel (Prior) on May 18, 2011 at 22:32 UTC
    My fault for leaving the $/ part out originally! Been looking at this code for too long. :(

    Elda Taluta; Sarks Sark; Ark Arks