$mail = 'bla@bla.com'; if ($mail =~ /\w+@\w+\.\w+/){ print 'OK'; }else{ print 'BAD'; }