Does anyone know if Activeperl uses Windows 'stdlib' for the rand and srand function? I'm using perl 5.16. Thanks in advance for your response.
Asked
Active
Viewed 43 times
1 Answers
-1
my $s = 4071;
my $rnd = sub {return (($s = ($s * 214013 + 2531011) % 2 ** 31) >> 16 )};
foreach(0..51){print $rnd->()," "}
print "\n";
srand(4071);
foreach(0..51){print rand()*2**15," "}
print "\n";

shirha
- 1
- 1