$hold=@arr; foreach (0...$hold){ push(@newarr, splice(@arr,int(rand(@arr)),1)); }