I am having some trouble wrapping my head around this problem.
I have an array with five words in it. Each word is it's own element, like so:
@words = ("word0", "word1", "word2", "word3", "word4");
What I want to do is print out all permutations of these five words. If I did the math right, there is about 120 different permuatitions of these words.
I thought I would be able to print them with a loop, but I cannot seem to figure out how to do this.
Cn anyone offer any help?
I have an array with five words in it. Each word is it's own element, like so:
@words = ("word0", "word1", "word2", "word3", "word4");
What I want to do is print out all permutations of these five words. If I did the math right, there is about 120 different permuatitions of these words.
I thought I would be able to print them with a loop, but I cannot seem to figure out how to do this.
Cn anyone offer any help?