toma has asked for the wisdom of the Perl Monks concerning the following question:
I would like to be to store the state of the random
number generator. I would like to specify the seed value
on the first run of the program, but then after that
I want the random number generator to pick up where it
left off. I want to store the last state of the random
number generator in a file. The next time I run the
program, I want it to read the file and put the
random number generator back into its previous state.
Is this possible in Perl? I did this in once in C a long time ago, and now I want to do it again in perl. The linux (or BSD 4.3) initstate() and setstate() calls enable this capability in C.
It should work perfectly the first time! - toma
Back to
Seekers of Perl Wisdom