#!/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";
In reply to Re: Getting Keys of Hash from Values
by ptum
in thread Getting Keys of Hash from Values
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |