The readline on the filehandle is still not performed until needed and @values is kept intact.my $iter = do { my $i; sub { $i < @values ? $values[$i++] : <$filehandle> } }; while ( my $line = $iter->() ) { ## do stuff ... }
blokhead
In reply to Re: Glob + list = list concatenation
by blokhead
in thread Glob + list = list concatenation
by cyberconte
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |