in reply to Combinations of a set of elements
This is in the perlfaq documents. Try
perldoc -q permute [download]