If the program runs correctly from the command line then you probably have some trouble with the CGI environment, which could be file permissions of the program or the file you are reading, or perhaps misconfiguration of the web server. You could also be missing the CGI module.
If I were you I would put a print "Content-type: text/html\n\nTEST"; at the very top before your use statement. If you still have this error your permissions, or perhaps using ".pl" when your server wants ".cgi", or your perl path (try which perl at the unix command line) or something else outside your program is the problem. That print statement will also let you see if the header command is working.
One thing for sure, if you are only testing your program by running it from a browser, and the use statement fails, you will never be able to figure out what is going on without printing the header manually first. The minimum program is much smaller than what you have, just the first couple lines I would say.
In reply to Re: same 500 server error problem shorter question
by mattr
in thread same 500 server error problem shorter question
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |