++$i and $s += $1 while($_ = and /(\d+)/); print "the average is: ",$s/$i,"\n";