Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re^2: Is this really random?

by karlgoethebier (Parson)
on Nov 22, 2012 at 18:30 UTC ( #1005168=note: print w/ replies, xml ) Need Help??

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»

Comment on Re^2: Is this really random?
Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005168]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2015-11-28 19:10 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls