I’m struggling with a good way to do this and wonder if there is a tried and tested method or a module that has this kind of capability? What I want to do is take something of the form:
/[Part1a, Part1b]/[Part2a, Part2b, Part2c]/[Part3a, Part3b]/
and expand it to all possible combinations, i.e.
/Part1a/Part2a/Part3a
/Part1a/Part2a/Part3b
/Part1a/Part2b/Part3a
/Part1a/Part2b/Part3b
/Part1a/Part2c/Part3a
/Part1a/Part2c/Part3b
/Part2a/Part2a/Part3a
/Part2a/Part2a/Part3b
/Part2a/Part2b/Part3a
/Part2a/Part2b/Part3b
/Part2a/Part2c/Part3a
/Part2a/Part2c/Part3b
The number of list members and path elements can vary. Any pointers?