open my $FILE1, '<', "FILE1.TXT" or die "Can't open FILE1: $!\n"; while (<$FILE1>) { ... }