Add <BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">quote:</font><HR>print "Content-type: text/html\r\n\r\n";<HR></BLOCKQUOTE>to the top of the file, then add code to check the return value of open().