It should be as simple as that:
my @common_keys = grep { exists $hash1->{$_} } keys %$hash2; [download]
In reply to Re: Common hash keys by ferreira in thread Common hash keys by Anonymous Monk