in reply to Need help converting!!!

looks like a college assn
but who cares
while(print "in> " and chomp($a = <STDIN>) and $a >= 0){ $c++; $s += $a; $m = $a if !$m; $M = $a if $M < $a; $m = $a if $m > $a; } print "max: $M\navg: ".$s/$c."\nmin: $m\n";

here is another one
a bit uglier and shorter
push @r, $a and $s += $a while print "in> " and chomp($a = <STDIN>) an +d $a >= 0; @r = sort {$a cmp $b} @r; print "max: $r[$r-1]\navg: ".$s / @r." \nmin: $r[0]\n";