Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: how to sort this?

by salva (Abbot)
on Mar 25, 2006 at 11:19 UTC ( #539171=note: print w/replies, xml ) Need Help??

in reply to how to sort this?

use Sort::Key::Maker iikeysort => qw(integer integer); @sorted = iikeysort { /^(\d+)x(\d+)$/ } @a;
update: and now even simpler:
use Sort::Key::Multi 'iikeysort'; @sorted = iikeysort { /^(\d+)x(\d+)$/ } @a;
or if the chars between the two numbers can vary:
use Sort::Key::Multi 'isikeysort'; @sorted = isikeysort { /^(\d+)(\w+)(\d+)$/ } @a;

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://539171]
[Lady_Aleena]: atcroft, the whole link thing might be a question for either or both the CPAN sites. search.cpan is cpansearch@perl. org, and metacpan doesn't have an email addy for the website itself.
Lady_Aleena just followed @metacpan on Twitter.
[atcroft]: I may just post a question about it later. *shrug*
[Lady_Aleena]: I wish I could have helped you further but I've never uploaded to cpan or metacpan so I don't know much.
[Lady_Aleena]: If metacpan had a pod checker too, I could check a pod I wrote with a module link there.

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2017-05-27 04:34 GMT
Find Nodes?
    Voting Booth?