in reply to Array Question
my %count; for (@letters) { $count{$_}++; } for ( map { $_->[0] } sort { $b->[1] <=> $a->[1] } map { [ $_, $count{$_} ] } keys %count ) { print $_, "=>", $count{$_}, "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Array Question
by ikegami (Patriarch) on Aug 19, 2005 at 14:44 UTC |