The order of operations in the script ought to be something like this:
While you are there, you might also want to think about why you are using CGI twice, why you are using Getopt::Long and Fcntl and then apparently not referring to them, why you are not using strict and warnings, just how dangerous it is to shell out to a script located in /tmp and why you aren't running in taint mode.
In reply to Re^3: Perl CGI redirect
by hippo
in thread Perl CGI redirect
by aksusa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |