Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
l ttyaMeos arrCsrihm!!l
With my perls, the original one-liner works as intended for 5.8.8 up to and including 5.18.0. But with 5.20.0 I get the same as you. The srand documentation contains this: That suggests to me that srand(42) should produce identical results whenever it is called. I can't find anything in the docs that indicate there have been changes to srand - grepping 5.20.0 perldelta for srand produced no hits. However, there *is* mention (in perldelta) of changes to rand with 5.20, and I guess that if the rand implementation has changed then the same seed will no longer yield same results. I do think that the breakage of srand($seed) between 5.20 and earlier perls should have been spelled out in the srand documentation ... probably worth a bug report from someone who cares. Cheers, Rob In reply to Re^6: Late PM, 12/24/2014 & all year long
by syphilis
|
|