go ahead... be a heretic  
PerlMonks 
Combinations of array?by dagwood00 (Initiate) 
on Jun 09, 2012 at 01:04 UTC ( #975263=perlquestion: print w/replies, xml )  Need Help?? 
dagwood00 has asked for the wisdom of the Perl Monks concerning the following question:
Hi Everyone  need some wisdom!!!
I'm trying to work out creating a set of combinations for something as follows:
@array = qw( A B C D E);
I need to generate something like the follow set of combinations:
A A B A C A D A B C A B C D B B C B C D C C D DI may have missed some combinations, but I think this is the general pattern. I need to generate every pattern possible. I've looked at Algorithm::Permute and Algorithm::Loops, but these provide permutations and this is not really permutations. Any help, leads or examples would be definitely appreciated.
Back to
Seekers of Perl Wisdom

