++$i and $s += $1 while($_ = <STDIN> and /(\d+)/); print "the average is: ",$s/$i,"\n"; [download]
In reply to Re: Average/mean calculator by Lennotoecom in thread Average/mean calculator by Paradizingmania