in reply to Minimally changing combinations
Hello Yary
I think you are looking for Algorithm::Permute or perlfaq4/How do I permute N elements of a list? or Permutations and combinations.
Hope this helps, BR.