I think
return 1; #Pathological
should be
return 0; #Pathological
$a and $b are equal at that point, so zero should be returned.
I think some versions of sort in some versions of Perl even crashe when inconsistent results (a < b < a) are returned, something that can happen when returning non-zero for equal values.
In reply to Re^5: How would I sort a two-dimensional array by multiple columns?
by ikegami
in thread How would I sort a two-dimensional array by multiple columns?
by dbmathis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |