my @shuffledList = &shuffle(1..170000); sub shuffle { my @sl = @_; # soon to be Sorted List for my $i ( 1..$#sl ) { my $x = int(rand() * $#sl); my $y = int(rand() * $#sl); ($sl[$x], $sl[$y]) = ($sl[$y], $sl[$x]); } return @sl; }