Probably the ternary operator to the rescue:
sort { ($passes->{$a}->{'cpu'} ne '-' ? $passes->{$a}->{'cpu'} : 0) <=> ($passes->{$b}->{'cpu'} ne '-' ? $passes->{$b}->{'cpu'} : 0) } keys %{$passes}
UPDATE: In addition to choroba's solution you're able to assign a different value in case of '-'.
McA
In reply to Re: Numeric Sorting on Characters
by McA
in thread Numeric Sorting on Characters
by halecommarachel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |