- or download this
for ( my $i = scalar(@$results) - 1; $i >= 0; $i-- ){
for ( my $j = 1; $j <= $i; $j++){
...
}
}
}
- or download this
@$results = sort{ $b->{'hits'} <=> $a->{'hits'} } @$results;
- or download this
my $temp = $$results[$j - 1];
$$results[$j - 1] = $$results[$j];
$$results[$j] = $temp;
- or download this
($$results[$j - 1], $$results[$j]) = ($$results[$j],$$results[$j - 1])