One reason not to reinvent the wheel is to not make the same common mistakes. You're making the common mistake here. Please understand RFC 822 before writing a routine like this. Or just use something like Email::Valid to get it right.sub is_email { return sub { return $_[0] =~ m{^[-.+a-z0-9]+\@[-.+a-z0-9]+$}i; }; }
Your code downvoted. Ugh.
-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.
In reply to Re: Validate CGI data
by merlyn
in thread Validate CGI data
by marcelo.magallon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |