What are STDERR and STDIN and STDOUT connected to in a PCP?
In a CGI environment, STDERR points to the server error log file. You can take this to your advantage by outputting debug messages, and then checking the log file later on. Both STDIN and STDOUT point to the browser. In actuality, STDIN actualls points to the server which interprets the client (or browser’s) request and information, and sends that to the script. In order to catch errors, you can “dupe” STDERR to STDOUT early on in your script (after outputting the valid HTTP headers): open (STDERR, “>&STDOUT”); This redirects all of the error messages to STDOUT (i.e the browser).