sub by_cpu { no warnings 'numeric'; $passes->{$a}{cpu} <=> $passes->{$b}{cpu}; } for my $tc (sort by_cpu keys %$passes) { # ...
my @dashed; my @sorted = sort { $passes->{$a}{cpu} <=> $passes->{$b}{cpu} } grep { '-' ne $passes->{$_}{cpu} or push @dashed, $_ and 0 } keys %$passes; for my $tc (@dashed, @sorted) { # ...
Update: Ouch. no cannot go to the sort code. Changed option 2 and added option 3.
In reply to Re: Numeric Sorting on Characters
by choroba
in thread Numeric Sorting on Characters
by halecommarachel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |