Since you did say you started with perl a few weeks ago,
I'd like to give you just a hint.
Why don't you read the second file line by line and ...
Besides, as this was your question, you could find common and uncommon keys of two hashes by using a foreach loop, iterating over the keys of hash a and testing if it's present in hash b.
The hash category in
perlfunc should also help you.
Did you miss exists ?
michael