Keep It Simple, Stupid | |
PerlMonks |
Re: randomly choosing elements from an arrayby domm (Chaplain) |
on Mar 19, 2003 at 08:59 UTC ( [id://244288]=note: print w/replies, xml ) | Need Help?? |
What about shuffling the array using one of the shuffle functions in either List::Util or Algorithm::Numerical::Shuffle and then shifting off the desired number (or a random number) of elements?
In Section
Seekers of Perl Wisdom
|
|