in reply to Glob + list = list concatenation
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
|
|---|