In the OP's code. The return $a lines will return values like 'etc'. Sort expects -1, 0 or 1 as is returned by cmp and <=>.
In reply to Re^3: Argument isn't numeric in sort -- resolve or ignore?
by GrandFather
in thread Argument isn't numeric in sort -- resolve or ignore?
by Argel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |