fionbarr has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to sort date that looks like this:
my code looks like this:29 '0,wupra00a0537' 30 '31,wppra00a0513' 31 '0,wupra00a0535' 32 '0,wuprd02a0089' 33 '0,wupwa07a0663' 34 '0,wdpwa00a0013' 35
I want to sort by the number in descending order and the sort result is (partial):my @array = (); @array = map { $_->[0] } sort { $b->[1] <=> $a->[1] } map { [ $_, /.+,/ ] } @cpu_lt_40
147 '0,wuprm00a0539' 148 '0,wuprm00a0539' 149 '28,wppra02a0015' 150 '24,wppra01a0016' 151 '0,wupra00a0532' 152 '15,wppra01a0015' 153 '22,wppra01a0095'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: schwartzian transform
by Corion (Patriarch) on Oct 13, 2014 at 21:15 UTC | |
by fionbarr (Friar) on Oct 14, 2014 at 13:02 UTC | |
Re: schwartzian transform
by GrandFather (Saint) on Oct 13, 2014 at 21:16 UTC | |
Re: schwartzian transform
by Ea (Chaplain) on Oct 14, 2014 at 08:10 UTC | |
by Laurent_R (Canon) on Oct 14, 2014 at 09:41 UTC | |
by jonadab (Parson) on Oct 14, 2014 at 10:57 UTC | |
by Ea (Chaplain) on Oct 14, 2014 at 13:45 UTC | |
by AnomalousMonk (Archbishop) on Oct 14, 2014 at 14:49 UTC |
Back to
Seekers of Perl Wisdom