|go ahead... be a heretic|
dynamic map "quadrant" indexingby Anonymous Monk
|on Aug 14, 2005 at 09:35 UTC||Need Help??|
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
this is so embarassing. I feel this is easy, but somehow I'm too stupid to achieve it. Needed is a subroutine, that will print letter/number indices of map quadrants. Depending on the level (zoom):
Any means of doing this iteratively failed miserably, probably a recursive solution would be best, but somehow I'm failing to get a grip on the numbers:
$lvl can be anything from 1 to n, which results in 4**$lvl return values, each value consisting of $lvl <char><digit> numbers. As you probably figured out, chars are always [A-D] and digits [1-4].
This probably wouldn't be used for $lvl > 6, but you never know so I wanted to go for a generic solution.Do you have any idea HowTo?
Thanks a lot,