in reply to How to find the N largest values in an array?
my $n = 3; # top three my @highest = (sort { $b <=> $a } @num)[0 .. $n-1];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: Find largest ordered sequence in an array
by Anonymous Monk on Oct 03, 2001 at 23:18 UTC |