Not sure if I have found a bug with the rand() function under mod_perl.
#!/usr/bin/perl use CGI; my $query = new CGI; print $query->header; print "hello<br>"; main(); sub main { my $counter = int(rand(1e12)); print $counter; }
PROBLEM:
if run enough times on an apache webserver running mod_perl, -ie. refreshing 15, 20 times- numbers start repeating. I would assume that some internal variable in the function does not get initialized everytime the code is run?
In reply to random function bug on mod_perl by emilio
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |