Help for this page
my @found_keys = grep { exists($hash_b{$_}) } keys %hash_a; my @matched_keys = grep { $hash_a{$_} eq $hash_b{$_} } @found_keys; ... if ( @found_keys == @matched_keys ) { # All keys matched values. }