I have a script that sends an e-mail using Net::SMTP. It works fine when run from the command line as root. However, when run as a cgi-bin as the webserver's user, apache, it fails with $! = Permission Denied. I want to set Debug to 1 and capture the debug output. How do I do that in a CGI script?