N
Nomen Nescio
I want to pick three things at random from a list, so:
use List::Util 'shuffle';
...
sub pick {
my @items = shuffle(@_);
return join(",", @items[0,1,2]);
}
but every time I call this (repeatedly within the same run) with the
same input list, I get the same three items back out.
Is there any way to randomize shuffle more?
use List::Util 'shuffle';
...
sub pick {
my @items = shuffle(@_);
return join(",", @items[0,1,2]);
}
but every time I call this (repeatedly within the same run) with the
same input list, I get the same three items back out.
Is there any way to randomize shuffle more?