in reply to Perl Security - Prevent SPAM

First thing, don't re-invent the wheel on http request processing.
Use CGI or CGI::Simple, or some other module that has been very heavily tested, rather than trying to process data yourself.
For email address processing, try Email::Valid
my $addr = Email::Valid->address( -address => $email, -mxcheck => 0 ); if ($addr) { # send it }
For actual sending, look at some of the sending modules. Net::SMTP is a good one.