in reply to Re: How do I find the biggest number in an array of numbers.
in thread How do I find the biggest number in an array of numbers.

I didn't look at the module, but tell me: What's wrong with this:

my $n = 5; my @data = (1, 30, 4, 5, 12, -12, 4.1, 18,20, 2, 0 ,4, 36, 0, 8, 15, 4 +2, 4711, 0xdead, 0xbeef); my @top5= (sort { $b <=> $a } @data)[0..$n-1]; print join "\n",@top5,'';

s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
+.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e