my @array_q3=(); #create the array to store all words in the file open INFILE3, ") { chomp $line3; push @array_q3, $line3; } close INFILE; #sort the array so we can identify the duplicates my @sorted_array_q3 = sort(@array_q3); print "@sorted_array_q3\n";