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;