On 27/06/2011 19:53, sono...@fannullone.us wrote:

I'd like to find a way to check if an e-mail address that is entered
on a form is valid or, at the very least, just not invalid. Checking
CPAN, I ran across a module called Email::Verify::SMTP. Has anyone
used this before? If so, what are your impressions?

If this is not a good module, what would you recommend?

Hi Marc.

For doing the job of validating the format of an email address I suggest
Regexp::Common. Take a look at the code below.

Verifying that the address is a correct an functional is another matter
altogether, and a problem that I believe cannot be solved in general, if
for no other reason than that it would be a God-send for spammers.

Cheers,

Rob


use strict;
use warnings;

use Regexp::Common 'Email::Address';

my $email_re = $RE{Email}{Address};

print 'OK' if 'sono...@fannullone.us' =~ $email_re;

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to