sub popnum1 { ( $x, $y ) = @_; if ( ($y==0) || ($aod[$x][ $y-1 ] ne 'a') ) { return $initial + $aoa[$x][0]; } else { return $aoa[$x][$y] + $aob[$x][ $y-1 ]; } }