Like with most things perl, there's more then one way to do it. You could use Quantum::Superpositions, or (sort @array)[-1], or you could do somthing more reasonable, like
my $max=$array[0]; foreach (@array) { $max=$_ if ($_>$max) }
Or you could use List::Util::max (which is included with perl >=5.8.0)
In reply to Re: Get biggest value from array
by theorbtwo
in thread Get biggest value from array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |