my @array = qw( a b r a c a d a b r a ); my %counts; ++$counts{$_} for @array; for my $key ( sort { {$counts{$b} <=> $counts{$a} } keys %counts ) { print("$key: $counts{$key}\n"); }
In reply to Re: Simple Hash Question
by ikegami
in thread Simple Hash Question
by BlenderHead
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |