open FILE1, "what.txt" or die "can't open what.txt : $!\n"; open FILE2, "what1.txt" or die "can't open what1.txt : $!\n"; while ($first = and $second = ) { #combine strings somehow #push onto an array }