in reply to Getting srand's seed
Rather than try to retrieve the random seed, just call srand() again with your value to give a repeatable sequence, like so:
...roboticus$ perl -e 'srand(7); print int(rand(10)),"\n" for 1..10' 2 6 2 1 4 2 1 7 0 0 $ perl -e 'srand(7); print int(rand(10)),"\n" for 1..10' 2 6 2 1 4 2 1 7 0 0
|
|---|