<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Dean Serenevy wrote:
<blockquote cite="mid:4BF1CEF4.7070601@serenevy.net" type="cite">
  <pre wrap="">On 05/17/2010 05:25 PM, Alan Mead wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Assuming that shuffle() is not the culprit, I think it's just that when
    </pre>
  </blockquote>
  <pre wrap=""><!---->
Bad assumption. That is not the Fisher-Yates shuffle. Try this (from perlfaq):

sub shuffle {
  my $n = @_;
  while (--$n) {
    my $j = int rand ($n+1);
    @_[$n,$j] = @_[$j,$n];
  }
}

  </pre>
</blockquote>
<br>
Under light testing, this seems much better.&nbsp; Thanks!<br>
<br>
-Alan<br>
<br>
<pre class="moz-signature" cols="72">-- 
Alan D. Mead, Ph.D.
Assistant Professor of Industrial and Organization Psychology
Scientific Advisor to the Center for Research and Service
Illinois Institute of Technology
3101 South Dearborn, 2nd floor
Chicago IL 60616
+312.567.5933 (Campus)
+815.588.3846 (Home Office)
+312.567.3493 (Fax)

<a class="moz-txt-link-freetext" href="http://www.iit.edu/~mead">http://www.iit.edu/~mead</a>
<a class="moz-txt-link-freetext" href="http://www.center.iit.edu">http://www.center.iit.edu</a>
<a class="moz-txt-link-freetext" href="http://www.alanmead.org">http://www.alanmead.org</a>

He who fights with monsters should be careful lest he
thereby become a monster.
-- Friedrich Nietzsche, "Beyond Good and Evil"</pre>
</body>
</html>