This is the revision history for shuffle in <*:##NULL>
factoid_id | subject | copula | predicate | author | namespace |
---|---|---|---|---|---|
9554 | shuffle | is | use the List::Util module, or perl -le 'sub shuffle{my $aref = shift;my $i;for($i = @$aref; --$i;){my $j = int rand($i + 1);@$aref[$j,$i] = @$aref[$i,$j];}}@array = qw(A 2 3 4 5 6);shuffle(\@array);print @array;' | altreus | |
32 | shuffle | is | use the Util::List module, or perl -le 'sub shuffle{my $aref = shift;my $i;for($i = @$aref; --$i;){my $j = int rand($i + 1);@$aref[$j,$i] = @$aref[$i,$j];}}@array = qw(A 2 3 4 5 6);shuffle(\@array);print @array;' | perlbot |