Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: permutations of arrayby jynx (Priest) |
on Feb 22, 2002 at 05:28 UTC ( [id://146883]=note: print w/replies, xml ) | Need Help?? |
a couple of things,
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
|
|