Activeperl是否使用Windows“stdlib”进行rand功能

时间:2013-01-05 20:22:57

标签: perl std srand activeperl

有人知道Activeperl是否使用Windows“stdlib”作为rand和srand函数?我正在使用perl 5.16。提前感谢您的回复。

1 个答案:

答案 0 :(得分:-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";

Deal_cards_for_FreeCell#Perl