if ($TestEMail =~ /\w+@\w+\.\w{2,3}/) {print "$TestEMail\n";}
Joseph
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
The quest for an email validation script is becoming ancient and
legendary. I'm sure somebody else already has sounded off on this, but
the short answer is that there's no sure-way to validate email. There's
any number of potential problems:
1. The email address does not conform to the RFC
2.
I use this for email verification
$str =~ /^[^@]+@[^.]+\.[^.]/);
- Original Message -
From: "Dylan Boudreau" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, January 15, 2003 11:57 AM
Subject: Checking to see if input has valid data.
> T
Dylan Boudreau wrote:
> The input must be an email address and I am checking it the following
> way:
[snip]
> This does work but I am sure there must be a better way. The whole
> program is a search and replace utility for email addresses on all our
> mailing lists so when someone changes their
[mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 15, 2003 10:58 AM
> To: [EMAIL PROTECTED]
> Subject: Checking to see if input has valid data.
>
>
> The input must be an email address and I am checking it the following
> way:
>
> print "Enter
The input must be an email address and I am checking it the following
way:
print "Enter an address to replace: ";
chomp (my $search = );
unless ($search =~ /@/){
die "Search field must be an email address!\n";
}
print "Enter a replacement address: ";
chomp