- or download this
my $AoH = [ sort {
$a->{under} <=> $b->{undef}
|| $a->{order} <=> $b->{order}
} @$sqldata ];
- or download this
(2 <=> 2) == 0 so
0 || 2 <=> 1 evaluates to 2 <=> 1
(2 <=> 1) == 1 # the answer we wanted
- or download this
select ... order by under, order;