I observe that srand() merely returns “1.”According to Perl 5.14’s perlfunc entry for srand:
The point of the function is to “seed” the rand function so that rand can produce a different sequence each time you run your program. When called with a parameter, srand uses that for the seed; otherwise it (semi-)randomly chooses a seed. In either case, starting with Perl 5.14, it returns the seed.
Which I believe is what you’re looking for.
In reply to Re: Legacy code uses "srand()" .. how to avoid losing entropy?
by tchrist
in thread Legacy code uses "srand()" .. how to avoid losing entropy?
by locked_user sundialsvc4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |