Or, if you want to do it without ?: and add a slight touch of obfuscation:
for (sort { "-"x!!$reverse.1*($a cmp $b) } @array) { ... }
In reply to Re^2: Reverse sort array
by rovf
in thread Reverse sort array
by rethaew
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |