Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: incrementing mixed letters and numbers

by hdb (Monsignor)
on Aug 22, 2017 at 13:31 UTC ( [id://1197800]=note: print w/replies, xml ) Need Help??


in reply to incrementing mixed letters and numbers

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'.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1197800]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-04-23 11:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found