in reply to CGI Error HTTP headers of doom
Make sure that in the properties of the website, under Mappings, .cgi or .pl (whatever you are ending your scripts with) is config-ed thusly --
.cgi path\to\perl.exe %s %s [download]