in reply to Re: Script for MAX and Min
in thread Script for MAX and Min

$min = $nums if ($min == undef); $max = $nums if ($max == undef);
Please note that this code is extremely misleading. undef as used here in a numeric context is exactly replaced with 0, with perhaps a warning if you turn on such.

The only operator that sees undef as what it is, rather than the empty string or 0, is the defined operator.

-- Randal L. Schwartz, Perl hacker