I would advise some design changes and coding practice improvements.
- use strict; (this will help catch a lot of potential bugs)
- use warnings; (this will help catch a few more)
- use taint mode (this will help make the script more secure)
- use CGI.pm
- use Email::Valid or some other CPAN module instead of a home rolled email validator
- use Mail::Sendmail or some other CPAN module instead of opening a pipe to sendmail
- Consider dividing into several smaller scripts (on per feature) instead of adding more features to this one. Smaller scripts == faster compile time. This will also improve your ability to maintain this code as well as add new features.
First glance suggestions...Hope they help.
/\/\averick
perl -l -e "eval pack('h*','072796e6470272f2c5f2c5166756279636b672');"