CGI-Programming

Handling Error Messages

By default, stand-alone perl programs send error messages to the screen. We may expect that CGI-programs will send error messages to the web browser, but this is not the case.

When Perl encounters an error, it sends a message to STDERR (standard error). When we run our program from the command line, STDERR is by default the screen. However, when we run the program through the Web, the Web server usually redirects STDERR to its error log file. It is possible to look at that file, but there are better solutions to track our errors in CGI-programs than that.


Table of Contents.