sort { $a->[1] cmp $b->[1] } ^^^
You want <=> for numeric comparison, not cmp.
In reply to Re: Sort an array using the Schwartzian transform
by Anonyrnous Monk
in thread Sort an array using the Schwartzian transform
by umasuresh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |