NAME
Thread::Rand - repeatable random sequences between threads
SYNOPSIS
use Thread::Rand; # exports rand() and srand()
use Thread::Rand (); # must call fully qualified subs
DESCRIPTION
*** A note of CAUTION ***
This module only functions on Perl versions 5.8.0 and later.
And then only when threads are enabled with -Dusethreads. It
is of no use with any version of Perl before 5.8.0 or without
threads enabled.
*************************
The Thread::Rand module allows you to create repeatable random sequences between different threads. Without it, repeatable random sequences can only be created within a thread.
SUBROUTINES
There are only two subroutines.
rand
my $value = rand(); # a value between 0 and 1
my $value = rand( number ); # a value between 0 and number-1 inclusive
The "rand" subroutine functions exactly the same as the normal rand() function.
srand
srand( usethis );
The "srand" subroutine functions exactly the same as the normal srand() function.
AUTHOR
Elizabeth Mattijsen, <liz@dijkmat.nl>.
Please report bugs to <perlbugs@dijkmat.nl>.
COPYRIGHT
Copyright (c) 2002 Elizabeth Mattijsen <liz@dijkmat.nl>. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.