in reply to Capture Error Messages to a File? How?

If you want to redirect the err messages (ie STDERR) to *another* log file then use the following:
jamie@lillith ~ $ perl -w perlprog.cgi >> textfile.txt 2> logfile
However if you want to direct STDERR to STDOUT (the output from the perl prog) then do the following:
jamie@lillith ~ $ perl -w perlprog.cgi > logfile 2>&1