http://qs1969.pair.com?node_id=1178696


in reply to Re^2: rand() function on Windows systems
in thread rand() function on Windows systems

Just for completeness, this pure perl version should also work:

{ my $seed; sub ppSrand{ $seed = int( $_[ 0 ] & 32767 ); } sub ppRand{ my $max = shift // 1; $seed = ( $seed * 214013 + 2531011 ); return ( ( $seed >> 16 ) & 32767 ) / 32768 * $max; ## Amend +ed per post below. } } ppSrand( 555 ); print int ppRand( 1000 );

With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice.