The relevant parts are:
* <=> does NUMERIC comparison.
* cmp does text/string comparison
You also need to extract the numeric part from the string when you want a numeric sort.
Regular expressions are useful for that.
"It's ten o'clock... Do you know where your AI programs are?"
In reply to Re: sorting number
by NetWallah
in thread sorting number
by dideod.yang
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |