my $infile = 'file1.txt'; open IN,'<',$infile or die "Could not open $infile : $!"; while (){ } close IN;