for ( do { my $fh = new IO::File "< $infile"; <$fh> } ) { ...