in reply to loop in loop method evasion

Feasibility of ever completing $N=15 aside, the following is simple and uses next to no memory:
use Algorithm::Loops qw( NestedLoops ); my @chartab = (0..9, 'a'..'z'); my $N = 3; NestedLoops( [ (\@chartab) x $N ], sub { print @_, ','; }, );