in reply to Bug in List::Util::shuffle ?
You're shuffling a one-element list containing an array reference, then dereferencing that. A one-element list has only one possible order.
Try this instead:
perl -e 'use List::Util qw(shuffle); @a=(1,2,3,4,5,6,7,8,9,10); foreac +h (1..24) { print join(",",shuffle(@a) )."\n"}'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Bug in List::Util::shuffle ?
by matija (Priest) on Dec 06, 2008 at 14:54 UTC |
In Section
Seekers of Perl Wisdom