in reply to Hashes: Obtaining the Key Value for a Given Value Value
There's a module, Sort::Key, for doing it faster, though it likely won't matter.for my $k (sort { $hash{$a} <=> $hash{$b} } keys %hash) { print "$k: $hash{$k}\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Hashes: Obtaining the Key Value for a Given Value Value
by o2bwise (Scribe) on Feb 20, 2006 at 19:59 UTC |