$n = @fhglist; foreach (reverse 0..$n) { my $draw = splice(@fhglist, rand $n, 1); push @fhglist, $draw; }