in reply to Getting the keys of identical values in a hash
Invert the hash, putting keys in anonymous arrays,
my %hash = {1 => 'One', 2 => 'Two', 3 => 'One'}; my %ihash; push @{$ihash{$hash{$_}}}, $_ for keys %hash; print "@{$hash{One}}\n";
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Getting the keys of identical values in a hash
by QM (Parson) on Sep 14, 2005 at 13:50 UTC |