Help for this page

Select Code to Download


  1. or download this
    my $least = min(keys %hash);
    my $largest = max(keys %hash);
    
  2. or download this
    sub max {
      my $max = shift;
      $max = ($max < $_) ? $_ : $max foreach @_;
      return $max;
    }
    
  3. or download this
    sub reduce (&@) {
      my $op = shift;
    ...
      }
      $A;
    }
    
  4. or download this
    sub max {
      reduce {$a > $b ? $a : $b } @_;
    }
    
  5. or download this
    sub sum {
      reduce {$a + $b} @_;
    }