in reply to Perl Security - Prevent SPAM

You might like to look at nms' tfmail for an example. (And please check out Writeup Formatting Tips and use code tags around your code.)