P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
There are two possibilities: it is (as you suggest) easy, or it is impractical. Given that the srand documentation doesn't describe a way to do it I'd guess it is impractical. A workaround that may be good enough for you is:
which uses the standard technique for seeding, then reseeds using the first "random" number generated. Note however that Perl's built in rand has many problems that may be an issue depending in your application. For serious work you would be much better using Math::Random::MT or one of the other random number generating modules. Perl reduces RSI - it saves typing In reply to Re: Getting srand's seed
by GrandFather
|
|