http://www.perlmonks.org?node_id=1005168


in reply to Re: Is this really random?
in thread Is this really random?

...what about using this?

#!/usr/bin/perl use strict; use warnings; open(RANDOM, "<", "/dev/random") || die $!; read(RANDOM, $_, 4); close RANDOM; my $seed = unpack("L", $_); print $seed . qq(\n); srand($seed); # do stuff...

Regards, Karl

«The Crux of the Biscuit is the Apostrophe»