The code you posted looks valid. You need to help others help you.
If you have access to your server logs, please post the error.
If not, add the following:
use CGI::Carp 'fatalsToBrowser'; after the shebang but before any other lines in your script and post the error shown.
You should probably read Troubleshooting Perl CGI scripts as well.
| [reply] [d/l] |
It's like I said, I'm not getting any errors. It guest won't detect the cookies
if (defined($cgi->cookie('name')))
Doesn't work. I keep get 500 internal server errors, and O don't have access to server logs
| [reply] |
Well, it sucks that you don't have access to server logs. Makes debugging much more difficult. Have you considered another hosting company?
Anyway, back on topic, did you try CGI::Carp? use CGI::Carp 'fatalsToBrowser'; will print headers and then print the error message that caused the script to fail (most of the time). Again, put it near the top of the script, before any other statements but after the shebang line. Try that and post the results...
| [reply] [d/l] |