catfish1116 has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing a simple script that grabs the largest number from a list. I am trying out the List::Util function and am getting an error. Below is code and error
#! /usr/bin/perl use v5.16; use warnings; use List:: Util qw(max); ############# ## 03/14/19 ## Program utilizes List::Util function my $max = max( 55, 101, 3, 983, 17, 45, 8744, 2) print " This is the largest $max \n"; syntax error at ./Page_290 line 4, near "Util qw(max)" syntax error at ./Page_290 line 11, near ") print" Execution of ./Page_290 aborted due to compilation errors
TIA the catfish
~
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Use of List::Util
by LanX (Saint) on Mar 14, 2019 at 15:36 UTC | |
Re: Use of List::Util
by dasgar (Priest) on Mar 14, 2019 at 16:48 UTC |
Back to
Seekers of Perl Wisdom