in reply to Re: How do I shuffle an array?
in thread How do I shuffle an array?
I prefer japhy's one-liner, which achieves shuffling via fisher-yates:
ttfn,
...wufnik
-- in the world of the mules there are no rules --
as an aside - this is in the snippets section. would it not be nice to use snippets, or grinder's fabled categorized snippets library, as a source of data for categorized q&a?@entry[-$i,$j] = @entry[$j,-$i] while $j = rand(@entry - $i), ++$i < @ +entry;
ttfn,
...wufnik
-- in the world of the mules there are no rules --
In Section
Seekers of Perl Wisdom