Hello Perl_Ally, and welcome to the Monastery!
muba has answered your question; I’ll just add a couple of comments:
The syntax sort { $a <=> $b } does sort numerically, but in ascending order. To get descending order, you reverse $a and $b: sort { $b <=> $a }.
The syntax @array[...] is called an array slice. See perldata#Slices.
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
In reply to Re: Code Interpretation
by Athanasius
in thread Code Interpretation
by Perl_Ally
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |