if($mail_id=~/^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$/) { print "matched \n"; } else { print "Not matched \n"; }