my ($min,$max); $min=$max=; while (my $ts=) { $min = ($min gt $ts) ? $ts : $min; $max = ($max lt $ts) ? $ts : $max; }