Hello All,
I'm sure your all sick of these questions.
My problem is I want to combine files in all different ways without repeats.
So say I have five files, file1, file2, file3, file4, file5. these are stored in an array.
I then want to combine like so (file1, file2), (file1, file3) and so on
then (file1, file2, file3) (file1, file2, file4) ... but then I will need to do (file1, file3, file4)...
then add another file to combine (file1, file2, file3, file4) untill all combinations without repeating the same file in a combination.
Can anyone give me some advise.
I think I need an array of files, then a copy of this array to Combine the files then an array of the combinations. So I would iterate with a for loop through the @files while iterating through the @files2comb, then storing the combinations in @combines. But then I'm not too sure how to go about implenting it.
I'm sure your all sick of these questions.
My problem is I want to combine files in all different ways without repeats.
So say I have five files, file1, file2, file3, file4, file5. these are stored in an array.
I then want to combine like so (file1, file2), (file1, file3) and so on
then (file1, file2, file3) (file1, file2, file4) ... but then I will need to do (file1, file3, file4)...
then add another file to combine (file1, file2, file3, file4) untill all combinations without repeating the same file in a combination.
Can anyone give me some advise.
I think I need an array of files, then a copy of this array to Combine the files then an array of the combinations. So I would iterate with a for loop through the @files while iterating through the @files2comb, then storing the combinations in @combines. But then I'm not too sure how to go about implenting it.
Comment