for my $valNum (0 .. $total){