Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Sort::Maker not making sort

by salva (Canon)
on Apr 19, 2007 at 11:18 UTC ( [id://610926]=note: print w/replies, xml ) Need Help??


in reply to Re: Sort::Maker not making sort
in thread Sort::Maker not making sort

With Sort::Key it can be done as follows:
use Sort::Key qw(ikeysort); my @unordered = (qw/very_long short/); my @ordered = ikeysort { length } @unordered;
or also...
use Sort::Key::Maker sort_len => sub { length } , qw(integer); my @unordered = (qw/very_long short/); my @ordered = sort_len @unordered;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-26 04:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found