One more thing.
Apparently, the random number seed sub is not necessary the srand operator works the same between the old and the new versions. The simplified code below is enough.
my $seed = srand( 555 ); print ppRand( ), "\n"; sub ppRand { my $max = shift || 1; $seed = ( $seed * 214013 + 2531011 ); return ( ( $seed >> 16 ) & 32767 ) / 32768 * $max; }
In reply to Re^7: rand() function on Windows systems (pure Perl)
by bakiperl
in thread rand() function on Windows systems
by bakiperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |