in reply to Is this a fair shuffle?

It's okay. I suggest you use List::Util though. Here is the code in List::Util:
sub shuffle (@) { my @a=\(@_); my $n; my $i=@_; map { $n = rand($i--); (${$a[$n]}, $a[$n] = $a[$i])[0]; } @_; }
-Will

Replies are listed 'Best First'.
Re^2: Is this a fair shuffle?
by adrianh (Chancellor) on May 02, 2004 at 13:47 UTC
    Here is the code in List::Util

    Just as a point of information List::Util will use an XS version if possible, which is considerably faster than the Perl one listed above.

    Really there isn't any reason not to use List::Util if its available, and it's been core since 5.007003.