http://www.perlmonks.org?node_id=356701


in reply to CGI Error HTTP headers of doom

There could be lots of things wrong. It sounds like your script is fine, but just in case it isn't (maybe some use statements are failing - they get executed before the rest of your code, as if they were wrapped in a BEGIN{} block) you could try making this your first statement:

use CGI::Carp qw(fatalsToBrowser);

This will catch any runtime errors and redirect them so the browser can see them.

However, more likely it is a configuration error. Check with a very simple test script to see if it works, e.g.

print "Content-type: text/html\n\n"; print "<html><body>OK</body></html>";

if that fails, it is an IIS config problem.

A massive flamewar beneath your chosen depth has not been shown here