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

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-13 Thread David Gilden
Dear Perl Gurus, I have some problems that I think are a result of how my Switch statement is written. This script is invoked via a web browser to upload a file, and do a few other things. However it appears that the user system / network, or my script is stalling. So the user clicks the butt