my $max=15; my $n=10; my @numbers = 0..$max-1; for (1..$n) {  my $i = rand @numbers;  print $numbers[$i];  splice @numbers, $i, 1; }