Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 about the Monastery: (4)
As of 2014-09-21 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (168 votes), past polls