First, run this script through perltidy to clean up the formatting.
Don't use global variables in mod_perl (or anywhere else, but especially in mod_perl) unless you have to. Use lexical (my) variables instead.
While you're fixing that, make sure you define all your variables in the minimal scope you can, so they're not accidentally overwritten somewhere else in the script. You're using strict for a reason, right?
I won't mention the $file thing, because you already have, but use taint mode in CGI scripts when you start writing them. Making a script secure is harder than making a secure script.
Now, about your question: I suspect if you fix the problems above, the answer will become clear, or it will solve itself :-)
update: since you've got warnings enabled, you will probably want to check the server's error log. the CGI to mod_perl porting guide is also very helpful in these instances.
In reply to Re: Can't seem to reinitalize arrays
by Joost
in thread Can't seem to reinitalize arrays
by chriso
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |