I am currently writing a CGI application and have a few lines of code which slow the program down (so it stops) when included. I wondered how I could re-write it so it doesn't cause this problem.
The core of the program is within a foreach ($line) loop so certain variables are'nt defined for each line - I thought I would have got around this problem by using an if-defined test. I would appreciate your advice.
# @array and @numbers both contain numbers. if (defined ($array[0])) { foreach my $num (@numbers) { if ($array[0] == $num) { print "FOUND<P>"; } } }
In reply to slow CGI's by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |