RE: re rand bug?

2001-07-09 Thread Purcell, Scott
Birznieks [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 6:22 PM To: Purcell, Scott; '[EMAIL PROTECTED]' Subject: Re: rand bug? Your problem is likely that the use of a global my is creating a closure (see mod_perl guide). Replace it with use vars qw($rand); and don't declare your globals

Re: re rand bug?

2001-07-09 Thread darren chamberlain
Purcell, Scott [EMAIL PROTECTED] said something to this effect on 07/09/2001: Sorry to be confused, but I believe I did not create a global variable. In the code below that I showed, I used a my to localize the $tmp variable inside the for loop.? Anyway, I changed the simple code and added

RE: re rand bug?

2001-07-09 Thread Stas Bekman
Scott -Original Message- From: Gunther Birznieks [mailto:[EMAIL PROTECTED]] Sent: Friday, July 06, 2001 6:22 PM To: Purcell, Scott; '[EMAIL PROTECTED]' Subject: Re: rand bug? Your problem is likely that the use of a global my is creating a closure (see mod_perl guide). Replace

rand bug?

2001-07-06 Thread Purcell, Scott
Hello, rand bug with mod_perl? my $rand = int(rand(1000)) always produces '2' under mod_perl. I have noticed that if I ask for the line above, it always puts $rand at a '2'? So I did some test below, looping through and the first time through with mod_perl, the number is always 2? Under

Re: rand bug?

2001-07-06 Thread Gunther Birznieks
Your problem is likely that the use of a global my is creating a closure (see mod_perl guide). Replace it with use vars qw($rand); and don't declare your globals using my. At 01:07 PM 7/6/2001 -0500, Purcell, Scott wrote: Hello, rand bug with mod_perl? my $rand = int(rand(1000)) always