open(FILE1, ' 1 } ; while () { if ($file2{$_}) { print("Found $_"); } else { print("Didn't find $_"); } } __END__ file1.txt ========= qwerty snakegod ebrine tarot file2.txt ========= snakegod ordo rosae moriatur tarot wrath of hibernia output ====== Didn't find qwerty Found snakegod Didn't find ebrine Found tarot