Another way to look at this is that you want a shuffled version of some list. Take (1..7) for example. With Algorithm::Numerical::Shuffle you can do that easily:
The idea of shuffling an array has been discussed before (and other places, too).@array = shuffle(1..7);
HTH, --traveler
In Section
Seekers of Perl Wisdom