hm, I don't know such function in Perl, but you simply can use map for this:
$max_value = 0;
map { $max_value < $_ && $max_value = $_ } @array;
or for cycle:
$max_value < $_ && $max_value = $_ for @array;
As you like it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.