Check if an email address is well-formed

KevinADC 0 Tallied Votes 292 Views Share

You will need to install the Email::Valid module if it's not already installed. See the module documentation for further details.

Email::Valid

use Email::Valid;
print (Email::Valid->address('anyuser@domain.com') ? 'Good email address' : 'Bad email address');