abitkin has asked for the wisdom of the Perl Monks concerning the following question:
my %hash2; for my $key (sort {$hash1{$b} <=> $hash1{$a}} keys %hash1){ if (exists($hash2{$hash1{$key}})){ $hash2{$hash1{$key}}++; } else { $hash2{$hash1{$key}}=1; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Easier Way?
by Arien (Pilgrim) on Aug 28, 2002 at 21:46 UTC | |
|
Re: Easier Way?
by Aristotle (Chancellor) on Aug 28, 2002 at 21:54 UTC | |
by abitkin (Monk) on Aug 28, 2002 at 22:00 UTC | |
by Aristotle (Chancellor) on Aug 28, 2002 at 22:17 UTC | |
|
Re: Easier Way?
by FoxtrotUniform (Prior) on Aug 28, 2002 at 21:30 UTC | |
by thelenm (Vicar) on Aug 28, 2002 at 21:49 UTC |