use strict; use warnings; my $zip = '01234'; my %zips = ( "City One" => "04321", "City Two" => "01234", ); my ($zip_match) = grep { $_ eq $zip } values %zips; print "\n $zip_match\n"; # 01234
In reply to Re^2: Hash search and returning by value
by Anonymous Monk
in thread Hash search and returning by value
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |