Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: How do I find the biggest number in an array of numbers.

by Skeeve (Parson)
on May 27, 2007 at 18:52 UTC ( [id://617759]=note: print w/replies, xml ) Need Help??


in reply to How do I find the biggest number in an array of numbers.

my @data = (1, 30, 4, 5, 12, -12, 4.1, 18,20, 2, 0 ,4, 36, 0, 8, 15, 4 +2, 4711, 0xdead, 0xbeef); my $max = $data[0]; $max= $_>$max ? $_ : $max foreach (@data); print $max,"\n"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://617759]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (7)
As of 2024-04-18 13:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found