Process File A contents and store in to %hash_one Process File B contents and strore in to %hash_two foreach $key (keys %hash_one) { if (! $hash_two{$key}) { Print "\nFile A contents", $hash_one{$key} , "missed at File B"; } }