It sounds like you're getting wrapped up in a few problems:
So tackle these problems separately. As a kludge, you should be able to make the program run as-is, but with better results.
BEGIN { our @RAND = (); our $COUNTER = 0; for (<DATA>) { $_ += 0; push @RAND, $_; } *CORE::GLOBAL::srand = sub(;$){ $COUNTER = 0 }; *CORE::GLOBAL::rand = sub(){ return $RAND[$COUNTER++] }; }
--marmot
In reply to Re^4: Legacy code uses "srand()" .. how to avoid losing entropy?
by furry_marmot
in thread Legacy code uses "srand()" .. how to avoid losing entropy?
by locked_user sundialsvc4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |