|P is for Practical|
Re^3: mem usageby BrowserUk (Pope)
|on May 26, 2010 at 19:17 UTC||Need Help??|
You can trim your shuffle a little by omitting the line: next if $i==$j;.
Swapping an item with itself doesn't affect the algorithm's fairness, and doing it once costs less, than testing n times and avoiding it once.
And you save a little more by avoiding the list assignment:
Doesn't look as nice though.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.