in reply to Re^4: Comparing Hash key with array
in thread Comparing Hash key with array

Glad that worked for you! I just wanted to make sure you saw my edit--your code will run far faster if you iterate through @lines first.