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
In reply to Re: Getting srand's seed
by roboticus
in thread Getting srand's seed
by fangly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |