Re: Variables in Modules

2005-04-14 Thread Sergio Pires de Albuquerque
David Dorward wrote: On Wed, Apr 13, 2005 at 05:14:31PM -0300, Sergio Pires de Albuquerque wrote: Thanks, but when I call another script from script1.cgi the value has gone HTTP is stateless. Each time a user requests an HTTP resource provided by a script, that script is run from scratch.

Re: Variables in Modules

2005-04-14 Thread Sergio Pires de Albuquerque
Lawrence Statton wrote: Dear Guys, I4ve been trying to develop an application that consists in about 8-10 scripts that should know about module variables (not OO yet). I read the docs and found that I can use a module variable (declared with our) in scripts that 'use' that module. Ok, there are:

RE: Preventing CPU spikes / was switch confusion

2005-04-14 Thread Charles K. Clarkson
David Gilden wrote: : --- what I have now : : use CGI qw/:standard/; : use CGI; Why use CGI.pm twice? You need to read the CGI.pm docs. There is no reason to ever call the module more than once. : use Fcntl qw( :DEFAULT :flock ); : use CGI::Carp qw(fatalsToB

Re: Preventing CPU spikes / was switch confusion

2005-04-14 Thread Sean Davis
On Apr 14, 2005, at 2:09 PM, Charles K. Clarkson wrote: How about skipping the Switch stuff and using something like this. use CGI qw/:standard Button/; . . . if ( param() ) { if ( param( 'action' ) =~ /Upload/ ) { # call upload sub } elsif ( param( 'action' ) =~ /Up