Help for this page

Select Code to Download


  1. or download this
    sub transform {
        my $coderef=shift;
    ...
    sub display {
        printf("Avg: %f",transform(sub { $a > $b ? $a : $b },@_));
    }
    
  2. or download this
    sub display {
        my (@quarterly_results) = @_;
    ...
        $average = sum(@_)/ scalar(@_);
        return($average);
    }