in reply to Comparing strings from different files
If the file are not too big, then the hash, as per Hippo's solution.
If they are too big, then sort them according to the key that matters to you, and read both files in parallel (but watch out, there are a number of edge cases, the algorithm can be a bit tricky).
In Section
Seekers of Perl Wisdom