Help for this page

Select Code to Download


  1. or download this
    $sort[scalar @sort - 1] == $sort[-1];
    
  2. or download this
    ($a, $b) = ($b, $a);  # swap the values of $a and $b
    
  3. or download this
    #!/usr/bin/perl -w
    use strict;
    ...
         = ($hash{$sort[-1]}, $hash{$sort[0]});
    
    print Dumper \%hash;