sub grid { my( $x, $y ) = @_; if( outOfRange( $x) or outOfRange( $y ) { return; else { # determine return value... return $rv; } }