Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Generating all possible combinations from an AoA

by james2vegas (Chaplain)
on Apr 13, 2011 at 09:06 UTC ( #899129=note: print w/ replies, xml ) Need Help??


in reply to Generating all possible combinations from an AoA

Use File::Glob's bsd_glob function, something like:

use File::Glob (bsd_glob); my @array = ( [ "a", "b", "c", ], [ "1", "2", "3", "4", ], [ "x", "y", ], ); my $glob = join( '', map { '{' . join( ',', @$_ ) . '}' } @array ); my @list = bsd_glob($glob);


Update: I guess I approached this as a Perl programming problem not as a programming logic problem, oh well.


Comment on Re: Generating all possible combinations from an AoA
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (8)
As of 2015-07-30 06:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls