Bishma has asked for the wisdom of the Perl Monks concerning the following question:
I'm in the proccess of writing a short cgi script and am looking for a little help. I need to be able to pick 5 random elements out of an ever growing array and all 5 have to be differnt elements from the array. Is there a simple way to do this? The only way I can come up with is painfully similar to a bubble sort and I really don't want to have to do all that coding.
Thanks in advance
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: picking multiple random elements out of an array
by Masem (Monsignor) on Feb 04, 2002 at 02:27 UTC | |
by dws (Chancellor) on Feb 04, 2002 at 04:09 UTC | |
by Bishma (Beadle) on Feb 04, 2002 at 03:47 UTC | |
Re: picking multiple random elements out of an array
by chipmunk (Parson) on Feb 04, 2002 at 07:05 UTC | |
(cLive ;-) Re: picking multiple random elements out of an array
by cLive ;-) (Prior) on Feb 04, 2002 at 03:22 UTC | |
Re: picking multiple random elements out of an array
by I0 (Priest) on Feb 05, 2002 at 01:30 UTC |
Back to
Seekers of Perl Wisdom