Help for this page

Select Code to Download


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