for (0..($#arr-1)) { $n = int (rand() * ($#arr - $_ + 1)) + $_;