Just thought i should mention that I recall discussion on P5P about optimizing sort when only N values will be used of the return. Assuming that work actually has been done I should think that
my ($x,$y,$z)=sort @foo;
Would be the most efficient way to do this. Problem is I really dont remember what the result of that thread was. :-(
In reply to Re: Better mousetrap (getting top N values from list X)
by demerphq
in thread Better mousetrap (getting top N values from list X)
by Limbic~Region
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |