in reply to cgi response
You need to put a hyphen in the 'Content type' word(s) instead of a space. Also, you have a space at the end of the header. I doubt this is part of the problem, but possible. So print "Content type: text/html \n\n"; should say print "Content-type: text/html\n\n";. Oddly, mozilla processes "Content type: text/html \n\n" just fine.
If the above content is missing any vital points or you feel that any of the information is misleading, incorrect or irrelevant, please feel free to downvote the post. At the same time, please reply to this node or /msg me to inform me as to what is wrong with the post, so that I may update the node to the best of my ability.