in reply to sorting number

Read the sort function documentation.

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?"

Replies are listed 'Best First'.
Re^2: sorting number
by dideod.yang (Sexton) on Apr 09, 2019 at 05:34 UTC
    Thanks replay, yes I know each function. but I want to use both of them. Is it possible to use both of them?