perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perrin Harkins <phark...@gmail.com>
Subject Re: srand
Date Sun, 05 Apr 2009 01:14:37 GMT
2009/4/4 "Stanisław T. Findeisen" <sf181257@students.mimuw.edu.pl>:
> How does this relate to mod_perl? Is it safe to simply call srand() once per
> CGI script?

It's safe, although there's not much reason to do it unless you have
access to something more random than what it will use by default.  You
should not call srand more than once in a running perl interpreter,
which is why the mod_perl docs advise against it.  The mod_perl docs
there are basically a quote from the perlfunc manpage:
http://perldoc.perl.org/functions/srand.html

- Perrin

Mime
View raw message