|
|
|
Clear questions and runnable code get the best and fastest answer |
|
| PerlMonks |
Re: permutations of arrayby jynx (Priest) |
| on Feb 22, 2002 at 05:28 UTC ( #146883=note: print w/ replies, xml ) | Need Help?? |
|
The major problem with the code you have there is that it doesn't give combinations of separated list items, it only gives items from one point forward. As an example: Merlyn's snippets are a nice and easy way to go; a simple transformation and they will return an array of strings instead of an AoA. As an exercise, i chalked up a non-recursive solution as well; it returns an array of arrays as merlyn's does. jynx
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||