Newbie question - email validation

Newbie question - email validation

am 21.10.2007 18:01:28 von newbie

Sorry if this is oft repeated but I cant find anything in faqs

can someone tell me the simplest (doesnt have to be the cleverest) means
of validating an email address (not MX lookup just the string itself)

thanks

newbie

Re: Newbie question - email validation

am 21.10.2007 18:41:13 von jurgenex

newbie@blank.com wrote:
> Sorry if this is oft repeated but I cant find anything in faqs
>
> can someone tell me the simplest (doesnt have to be the cleverest)
> means of validating an email address (not MX lookup just the string
> itself)

perldoc -q mail
"How do I check a valid mail address?"

jue

Re: Newbie question - email validation

am 21.10.2007 20:05:38 von Ron Bergin

On Oct 21, 9:01 am, new...@blank.com wrote:
> Sorry if this is oft repeated but I cant find anything in faqs
>
> can someone tell me the simplest (doesnt have to be the cleverest) means
> of validating an email address (not MX lookup just the string itself)
>
> thanks
>
> newbie

use Email::Valid;

my $validate = Email::Valid->new;
my $address = 'someone@somewhere.com';

print $validate->address($address) ? 'yes' : 'no';