From 3a3e71ebfede57e1ba7bc0b94773749f2b98e588 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Tue, 4 Sep 2001 12:09:43 +0000 Subject: [PATCH] Typo fix and slight rewording. p4raw-id: //depot/perl@11856 --- pod/perlfunc.pod | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index ebac4b7..ed144d1 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -4799,14 +4799,14 @@ Sets the random number seed for the C operator. It's usually not necessary to call C at all, because if it is not called explicitly, it is called implicitly at the first use of the -C operator. However, this was not the case in version of Perl +C operator. However, this was not the case in versions of Perl before 5.004, so if your script will run under older Perl versions, it should call C. The point of the function is to "seed" the C function so that C can produce a different sequence each time you run your program. Just do it B at the top of your program, or you -I get random numbers out of C! +I get random numbers out of C. If EXPR is omitted, uses a semi-random value supplied by the kernel (if it supports the F device) or based on the current @@ -4823,8 +4823,8 @@ Calling C multiple times is highly suspect. =item * -Do B call srand() (i.e. without an argument) more than once in a -script. The internal state of the random number generator should +Do B call srand() (i.e. without an argument) more than once in +a script. The internal state of the random number generator should contain more entropy than can be provided by any seed, so calling srand() again actually I randomness. And you shouldn't use srand() at all unless you need backward compatibility with Perls older @@ -4833,9 +4833,11 @@ than 5.004. =item * Do B call srand($seed) (i.e. with an argument) multiple times in -a script I you know exactly what you're doing and why you're -doing it. Usually this requires intimate knowledge of the -implementation of srand() and rand() on your platform. +a script for any other purpose than calling it with the I +argument to produce the I sequence out of rand() I you +know exactly what you're doing and why you're doing it. Usually doing +anything else than reusing the same seed requires intimate knowledge of +the implementation of srand() and rand() on your platform. =back -- 2.7.4