s|^(\d+)(\-(\d+))?$|$total_min += $1; $total_max += $3//$1|e for (@ranges);