in reply to shuffle array (in place)

here is a working version:
sub fisher_yates_shuffle { my $deck = shift; # $deck is a reference to an array my $i = @$deck; while ( $i-- ) { my $j = int rand( $i + 1 ); @$deck[ $i, $j ] = @$deck[ $j, $i ]; } } my @aa = qw/a b c d e f/; fisher_yates_shuffle( \@aa );
for more read perldoc -q shuffle.
Boris