in reply to Code Interpretation
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, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Code Interpretation
by Perl_Ally (Novice) on Jul 28, 2014 at 15:56 UTC |