http://qs1969.pair.com?node_id=509194


in reply to Getting Keys of Hash from Values

Like this?
my %hash = ( apple => 'red', banana => 'yellow', orange => 'orange', lemon => 'yellow', ); my $value = 'yellow'; my @matching_keys = grep { $hash{$_} eq $value } keys %hash; print("$_\n") foreach @matching_keys;