Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Is this really random?

by karlgoethebier (Prior)
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»

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1005168]
help
Chatterbox?
[choroba]: We say "Eat breakfest alone, eat lunch with a friend, give dinner to an enemy"
[choroba]: But you know who's your greatest enemy, right? *wink*
[Discipulus]: so also the dinner alone?

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (8)
As of 2017-10-19 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (252 votes). Check out past polls.

    Notices?