use Email::Valid; use CGI qw/:standard/; if ( !Email::Valid->address( $query->param('email') ) { print "E-mail address is not valid or is blank"; }