open my $fh, '<', $file; #### while (defined (my $it = get_it())) { do_with_it($it); }