in reply to Easy way to find permutations?

I think you'll find Set::CrossProduct does what you want.