Dying prints to STDERR, CGI expects STDOUT. Your death will be printed into the web server's error log instead. Perhaps you mean:
unless (open(FH, "<", "indexfile")) { print "Content-Type: text/html\n\n<h1>NOOOOOOO!!!!!</h1>Error: $!\n" +; exit(1); }
BTW, I highly recommend using the text/plain content-type as long as you are debugging. It makes errors a lot more evident because web browsers try to "fix" a lot of bad HTML. (And you don't have to think of escaping HTML at that moment. Escaping is something you lack currently. It will lead to cross-site scripting vulnerabilities.)
In reply to Re: CGI Help
by Anonymous Monk
in thread CGI Help
by linuxkid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |