Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Sort::Maker not making sort

by polettix (Vicar)
on Apr 18, 2007 at 22:16 UTC ( [id://610857]=note: print w/replies, xml ) Need Help??


in reply to Sort::Maker not making sort

Probably a little "side-topic", but I've seen an enthusiastic comment to Sort::Key, so you could give it a try even tough the interface is pretty different, and could not adapt to what you really aim to.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: Sort::Maker not making sort
by salva (Canon) on Apr 19, 2007 at 11:18 UTC
    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://610857]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-23 17:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found