in reply to Re: dynamic map "quadrant" indexing
in thread dynamic map "quadrant" indexing

Uhm... well forget it, the code is crap. This one does the right thing:
sub idx { my $lvl = shift; # ARG1: get level my @out = qw(a1 b1 c1 d1 a2 b2 c2 d2 a3 b3 c3 d3 a4 b4 c4 d4); # init OUT array return \@out if($lvl == 1); # bail out if lvl = 1 my @tmp; for my $o (@out) { push @tmp, map { "$o$_" } @{&idx($lvl-1)}; } return \@tmp; }
Probably I should not do my coding sunday morning. Marcel