Help for this page

Select Code to Download


  1. or download this
    ...
    
    ...
    
    # then include the value in your final print statement
    print "The largest element is: $maxval\n";
    
  2. or download this
    use strict;
    use List::Utils qw/max/; # add this line
    ...
    
    # and then use the function in your final print statement
    print "The largest element is: " . max(@array) ."\n";