As you are passing an explicit subroutine name to sort it takes that as the sorting operation. Remove the sort entirely (or don't pass it the subroutine name eg. by using the leading ampersand) and everything works fine.
So, it's a feature - not a bug.
In reply to Re: Ampersand changes behavior of subroutine
by hippo
in thread Ampersand changes behavior of subroutine
by w8lle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |