Marceluse strict; my $lvl ="@ARGV"; my $out = &idx($lvl); print "@$out\n"; sub idx { my $lvl = shift; my @out = qw(a1 b1 c1 d1); if($lvl == 1) { return \@out; } else { my @tmp = (); for my $o (@out) { push @tmp, "$o$_" for(@{&idx($lvl-1)}); } @out = @tmp; } return \@out; }
In reply to Re: dynamic map "quadrant" indexing
by Anonymous Monk
in thread dynamic map "quadrant" indexing
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |