On 2002.01.21 18:32 Michael G Schwern wrote: > On Sun, Jan 20, 2002 at 10:58:34PM -0800, Larry Wall wrote: > > : while( my $line = <FILE> ) { > > : ... > > : } > > > > That still works fine--it's just that $line lives on after the while. > > This creeping lexical leakage bothers me. While it might make the > language simpler, the proliferation of left-over lexicals seems > sloppy.
Not really -- you're not going to use a lot of different loop-variables, aren't you ? But : while ( my $line = <FILE> ) { ... } ... while ( my $line = <LIFE> ) { ... } is now probably going to issue some warning (about a lexical masking an earlier declaration, you know.)