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


in reply to Getting Keys of Hash from Values

Or how 'bout this?
#!/usr/local/bin/perl -w use strict; my %hash = ( apple => 'red', banana => 'yellow', orange => 'orange', lemon => 'yellow', ); my $value = 'yellow'; my %newhash = reverse %hash; print $newhash{$value}, "\n";