open FILE, "< file2.txt" or die; my @file2= ; # read the whole thing close (FILE);