in reply to Average/mean calculator

put in numbers continuously with enter, to do the calculations enter empty line
++$i and $s += $1 while($_ = <STDIN> and /(\d+)/); print "the average is: ",$s/$i,"\n";