On Dec 20, 2001 at 05:30 -0500, Jeremy Webster took the soap box and proclaimed:
:
: What is the best (standard, typical, easiest, hardest...) way to check that
: the information entered into a form is a valid email address?
:
: Is it just a matter of seeing if there is an @ sign and a dot in the string?
: or is there more to it?
Quite a bit, actually. I would use the module Email::Valid.
use Email::Valid;
if ( Email::Valid->address( '[EMAIL PROTECTED]' ) ) {
print "This is a valid email address.\n";
} else {
print "Stop the lies!\n";
}
Read about the module here:
http://search.cpan.org/doc/MAURICE/Email-Valid-0.13/Valid.pm
Casey West
--
The last good thing written in C++ was the Pachelbel Canon.
-- Jerry Olson
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]