in reply to Re: Finding the max()/min()
in thread Finding the max()/min()
Update:
Per elusion's update, he has already fixed both solutions.
============
Your solution one does not compile.
Your solution two does not work, and it does not print anything:
use strict; use warnings; print max(1.23,2.6,55.1,4,5); sub max { my ($max, $next, @vars) = @_; return if not $next; return max( $max > $next ? $max : $next, @vars ); }
|
---|
In Section
Meditations