Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: sorting number

by NetWallah (Canon)
on Apr 09, 2019 at 04:38 UTC ( [id://1232326]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1232326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found