On Sat, Oct 15, 2011 at 03:45, Lemon <[email protected]> wrote:
> Many thanks to Shlomi and Paul,
>
>
> I need to read sort manual and map manual.
>
yes, that's a good place to start.
but, just because i like being different and because i really enjoy
the power of this simple little module:
perl -e 'use List::UtilsBy qw/sort_by/; @arr = qw/4 5 3 6 2/; @sorted
= sort_by { $_ } @arr; print "@sorted\n";'
oh, and because LeoNerd wrote it and because it does what you want
with less typing :)
--
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
http://learn.perl.org/