Help for this page

Select Code to Download


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