Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Sorting an array on two computed fields

by blazar (Canon)
on Dec 16, 2005 at 10:12 UTC ( #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?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2022-05-26 12:27 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (93 votes). Check out past polls.