in reply to Validate CGI data
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Validate CGI data
by marcelo.magallon (Acolyte) on Jun 26, 2005 at 20:36 UTC | |
by merlyn (Sage) on Jun 26, 2005 at 21:14 UTC |