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


in reply to Re^2: reverse sort arrays in subroutines
in thread reverse sort arrays in subroutines

I was probably not explicit enough. Let's take an example:
1 3 2
If we first reverse it, we get
2 3 1
and then we sort it to get
1 2 3

On the other hand, if we sort it first, we get

1 2 3
and we can then reverse it to
3 2 1

Functions are not called left to right, but from the innermost to the outermost, i.e. rather right to left.

لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ