Help for this page

Select Code to Download


  1. or download this
    my %hash=();
    my $highest;
    my @highest=grep {defined $highest ? $hash{$_}==$highest : (($highest=
    +$hash{$_}),1) } 
                sort { $hash{$b} <=> $hash{$a} || $a cmp $b } 
                keys %hash;
    
  2. or download this
    my %hash=();
    my %rev;
    ...
      $highest=$hash{$_} if $highest < $hash{$_};
    }
    print sort keys %{$rev{$highest}};