in reply to Re^2: Array Shuffle
in thread Array Shuffle

OK, then how about this:

  1. Take your array, and make a copy.
  2. Shuffle one of them.
  3. Compare the elements of the arrays.
  4. If you find a match, then go back to step 2.
  5. If not, then quit - you've found a unique shuffling.

I have to admit that this is a fairly simple-minded approach, but consider the source ;-). I don't doubt that there is a Perlish way of doing it - there always is. But I don't know it, yet.