Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Sorting an array on two computed fields

by blazar (Canon)
on Dec 16, 2005 at 10:12 UTC ( [id://517197]=note: print w/replies, xml ) Need Help??


in reply to Sorting an array on two computed fields

I think you want Sort::Naturally.

But if it's just for this restricted task, then of course you can roll your own code. Well, you can try your hand at the general problem too.

Having asked this very question myself some time ago in clpmisc I'll point you there: search for "sorting strings numerically"; e.g.: Benjamin Goldberg's reply and this thread. Unfortunately I cannot get from Google all the relevant posts in one thread.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (7)
As of 2024-03-28 09:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found