sub popnum3 { my ( $x, $y, $z ) = @_; my @row = @{$aob[ $y - 1 ]}; my $mean = mean(@row); $aob[$x][$y] = $mean * ( 1 + $z ); return $aob[$x][$y]; }