Use Algorithm::Loops.
In reply to Re: Generating all possible combinations from an AoA by GrandFather in thread Generating all possible combinations from an AoA by Anonymous Monk