We don't bite newbies here... much | |
PerlMonks |
printing all combinations of an array..by Anonymous Monk |
on Feb 19, 2002 at 18:47 UTC ( [id://146419]=perlquestion: print w/replies, xml ) | Need Help?? |
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi PerlMonks, here's my problem: I have an array of less than 6 strings, and I want to print all combinations of these strings. Ex: @words = (nvidia,GeForce,2,MX); this should print out: nvidia GeForce 2 MX nvidia 2 MX nvidia GeForce MX nvidia MX nvidia 2 GeForce nvidia MX 2 nvidia MX GeForce GeForce nvidia GeForce nvidia 2 GeForce nvidia MX GeForce 2 nvidia . . etc. please help me find a solution to this, I'd be so grateful :) -Dar
Back to
Seekers of Perl Wisdom
|
|