in reply to Re: Re: "print" in a CGI script.
in thread "print" in a CGI script.

The key is the "\n" before you print anything out in the error subroutine. When the web server looks at this, it usually assumes that the output is text and will print the header for you. For example, the following script will work:
print "\nStuff!";

whereas the following will not:
print "Stuff!";

You may verify the header business by opening a telnet session to port 80 on your web server and typing:
GET /path/to/script.pl HTTP/1.0
and then pressing Enter twice.