<?xml version="1.0" encoding="windows-1252"?>
<node id="1007319" title="How do I make a random shuffle deterministic?" created="2012-12-05 11:20:32" updated="2012-12-05 11:20:32">
<type id="115">
perlquestion</type>
<author id="961">
Anonymous Monk</author>
<data>
<field name="doctext">
&lt;p&gt;I know how to randomly shuffle an array.

&lt;code&gt;
sub fisher_yates_shuffle {
        my $array = shift;
        my $i = @$array;
        while ( --$i )
        {
                my $j = int rand( $i+1 );
                @$array[$i,$j] = @$array[$j,$i];
        }
}
&lt;/code&gt;

&lt;p&gt;How can I rig the shuffle so that the results are always same on any given host but, random between different hosts?
</field>
<field name="reputation">
12</field>
</data>
</node>
