Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 chanting in the Monastery: (9)
As of 2014-12-26 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (165 votes), past polls