sub min { my $min; for (@_) { next unless defined; $min = $_ if $_ < $min } $min }