in reply to Puzzeled about Sorting

Ok, think about what your sort routine does:

sort {$a <=> $b || $a cmp $b}

It means that if $a and $b are equal numerically, then it will do a string comparison on them.