my $g0to9 = '{'.join(',', '0'..'9').'}';
my $gAtoZ = '{'.join(',', 'A'..'Z').'}';
my %glob = join('', $g0to9 x 3, $gAtoZ, $g0to9 x 4);
while (my $_ = glob($glob)) {
...
}
или
[ Deleted ]
или
for my $p1 ('000'..'999') {
for my $p2 ('A0000'..'Z9999') {
my $_ = "$p1$p2";
...
}
}
или
for my $ch0 ('0'..'9') {
for my $ch1 ('0'..'9') {
for my $ch2 ('0'..'9') {
for my $ch3 ('A'..'Z') {
for my $ch4 ('0'..'9') {
for my $ch5 ('0'..'9') {
for my $ch6 ('0'..'9') {
for my $ch7 ('0'..'9') {
my $_ = join '', $ch0, $ch1, $ch2, $ch3, $ch4, $ch5, $ch6, $ch7;
...
}}}}}}}}
или
use Algorithm::Loops qw( NestedLoops );
my $i = NestedLoops([
(['0'..'9'])x3,
(['A'..'Z']),
(['0'..'9'])x4,
]);
while (my @chs = $i->()) {
my $_ = join '', @chs;
...
}