NAMErand - retrieve the next pseudorandom number
SYNOPSISrand EXPRrand
DESCRIPTIONReturns a random fractional number between 0 and the value of EXPR. (EXPR should be positive.) If EXPR is omitted, returns a value between 0 and 1. This function produces repeatable sequences unless srand() is invoked. See also srand() .(Note: if your rand function consistently returns numbers that are too large or too small, then your version of Perl was probably compiled with the wrong number of RANDBITS. As a workaround, you can usually multiply EXPR by the correct power of 2 to get the range you want. This will make your script unportable, however. It's better to recompile if you can.) |
电话: 0086-0577-62319278, 62319276 传真: 0086-0577-62319276
|