use strict ; use warnings ; my @addresses = qw(you@somewhere.com me@here me@here@there@everywhere why@ @.it) ; foreach (@addresses) { print "$_ is " ; print /^\S+\@([a-z-]+\.)+[a-z]{2,4}$/ ? "GOOD!!!" : "bad" ; print "\n" ; } #### you@somewhere.com is GOOD!!! me@here is bad me@here@there@everywhere is bad why@ is bad @.it is bad