in reply to Hand Rolled CGI

This doesn't really answer your ultimate question, but do consider virtualsue's suggestion to use use CGI::Carp qw(fatalsToBrowser);, often a lifesaver.

Also consider using Mail::Sendmail or some other alternatives to the plain wrapper sendmail. The former is a bit more secure and allows you to do cleaner coding, as in:

my %mail = ( To => $to, From => $from, #Bcc => , #Cc => , Subject => $subject, Message => " Name = $name\n Email = $email\n etc.... "); sendmail(%mail) or die $Mail::Sendmail::error;

All the best


—Brad
"A little yeast leavens the whole dough."

Replies are listed 'Best First'.
Re: Re: Hand Rolled CGI
by tilly (Archbishop) on May 07, 2004 at 15:12 UTC
    Note that virtualsue's suggestion was to use CGI::Carp qw(fatalsToBrowser); for debugging. That should be for debugging only!

    You do not want to leave that line in pages in production since the debugging information provided can help an attacker "debug" how to effectively compromise your script.

      Absolutely, tilly, I never meant to imply that the line stay in for production code. But thanks for pointing that out.

      —Brad
      "A little yeast leavens the whole dough."