in reply to Selecting random records from an array
my @subset = grep rand(100) <= 75, @input;
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: •Re: Selecting random records from an array
by Juerd (Abbot) on Jun 03, 2003 at 22:25 UTC | |
by halley (Prior) on Jun 04, 2003 at 13:48 UTC | |
by Juerd (Abbot) on Jun 04, 2003 at 15:38 UTC |