In the future, please reply to the node you're replying to (sounds logical, doesn't it?).sub occurence { my %count; $count{$_}++ for @_; return sort { $count{$b} <=> $count{$a} } keys %count; } print "$_\n" for occurence qw(1 1 1 2 2 3 4 4 4 4);
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: Re: wisdom needed
by Juerd
in thread wisdom needed: sorting an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |