in reply to Common hash keys

It should be as simple as that:

my @common_keys = grep { exists $hash1->{$_} } keys %$hash2;