in reply to Select value from array w/o replacement (or destroying the array)

As a side note, Perl 6 has the pick builtin, which does what BioNrd wants:
my @picked = @list.pick(3); # randomly pick 3 elements; my @shuffled = @list.pick(*); # same as List::Util::shuffle
  • Comment on Re: Select value from array w/o replacement (or destroying the array)
  • Download Code