It's a numeric sort so the spaceship (<=>) is appropriate rather than the string cmp operator. Consider how '2', '100' and '11' sort for example.
In reply to Re^2: How to sort output?
by GrandFather
in thread How to sort output?
by dguntner
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |