variations_with_repetition in module Algorithm::Combinatorics also does what you want:
use strict; use warnings; use Algorithm::Combinatorics 'variations_with_repetition'; my @data = (0..9,'a'..'z'); my $iter = variations_with_repetition( \@data, 4 ); while( my $c = $iter->next ) { print "@$c\n"; }
It does end though when it reaches 'zzzz'.
In reply to Re: incrementing mixed letters and numbers
by hdb
in thread incrementing mixed letters and numbers
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |