use RFC::RFC822::Address qw /valid/; print "Valid\n" if valid 'foo@bar.com';