P is for Practical | |
PerlMonks |
Re: Sorting an array on two computed fieldsby blazar (Canon) |
on Dec 16, 2005 at 10:12 UTC ( [id://517197]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|