Are there any faults in this?
#!/usr/bin/perl use Sys::Hostname; sub seed { my $string = shift; my $seed; my @ascii = map ord, split //, $string; while ( <@ascii> ) { $seed += $_ }; srand $seed; } my $hostname = hostname; seed ( $hostname );
In reply to Re: How do I make a random shuffle deterministic?
by Anonymous Monk
in thread How do I make a random shuffle deterministic?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |