http://www.perlmonks.org?node_id=1034615


in reply to reverse sort arrays in subroutines

It is a misunderstanding. reverse is not a parameter to sort, it is a function that reverses a list.

Therefore,

sort reverse @array
is in fact
sort(reverse(@array))
i.e. it reverses the array and then sorts the result.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ