I am having a bit of trouble with cgi scripts. Every script i run I get

Internal Server Error -- error 500

I check the log file and it always says premature end of script header. I have downloaded many scripts where they work on the persons site but I put them in my cgi-bin directory and call it up and I always get that.

I have attached one of the scripts can someone test it or see what i did wrong.

Any help apreciated. Oh yea scrips are set to 777