I am using following code to validate e-mail addresses

if ($mail =~ m/^(\w+(\.|-))*\w+\@(\w+(\.|-)*)+\w+$/){
        valid
}else{
    invalid
}

it will give valid results for all of the following e-mail address

[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]


...

but I am not sure about the illegal chars for an e-mail address
can someone check above code tell me whether this matches all the valid
e-maill
address and only the valid e-mail addresses.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to