my @result; push @result, splice @list, rand @list, 1 while @result < $n;