in reply to Selecting random records from an array
if not you might want to glance at 'perldoc -q shuffle' for other ways to do this.use strict; use warnings; use List::Util 'shuffle'; my @big = (qw(u n s o r t e d)); my @shuffle = (shuffle(@big))[0 .. $#big*.75]; print join "|",@shuffle;
-enlil
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Selecting random records from an array (worse)
by tye (Sage) on Jun 03, 2003 at 23:37 UTC |