in reply to Find common values in a hash and print the respective keys
my %your_hash = ( aa => 1, bb => 2, cc => 3, dd => 4, ee => 2, ff => 5, gg => 3, hh => 2, ); use Var::Pairs; my %keys_for_each_value = invert(%your_hash); use Data::Dumper 'Dumper'; warn Dumper \%keys_for_each_value;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Find common values in a hash and print the respective keys
by Jim (Curate) on May 27, 2013 at 01:48 UTC |