in reply to Re^3: Generate sequential array element combos
in thread Generate sequential array element combos
Mostly springing from tye's solution, but it avoids the memory growth.
$\ = "\n"; for $n ( 4 .. 6 ){ print for '0' x $n .. '9' x $n; }
And if you needed different 'digits' then
$\ = "\n"; my @digits = 'a' .. 'j'; for my $n ( 4 .. 6 ) { print @digits[ split '', $_ ] for '0' x $n .. '9' x $n; }
|
|---|