I get a Server Error 500, Premature end of script: whatever.cgi
This only happens when I use "use CGI" instead of content-type: text/html in the code of the cgi file. I run the cgi file from the command prompt using "perl whatever.cgi" and I get the expected output with no error messages and using -w. Whenever I run a cgi using content-type: text/html, it loads in the browser no problem. Both files are in the same folder and both have the same permissions. I've been all over the forum and tried every trick I can find here, but I still have the same problem. What am I missing???
PLEASE HELP!!