My approach for top 4 would be using slice of a sorted array @sorted[0..3] ... so no need for map.
Can't easily tell if this was mentioned already... That's the fundamental problem with one liners... ;)
HTH! :)
Cheers Rolf
( addicted to the Perl Programming Language)
In reply to Re: Using map function to print few elements of list returned by sort function
by LanX
in thread Using map function to print few elements of list returned by sort function
by jaypal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |