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. > The input must be an email address and I am checking it the following > way: > > print "Enter an address to replace: "; > chomp (my $search = <STDIN>); > unless ($search =~ /@/){ > die "Search field must be an email address!\n"; > } > print "Enter a replacement address: "; > chomp (my $replace = <STDIN>); > unless ($replace =~ /@/){ > die "Replacement field must be an email address!\n"; > } > > 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 address I don't need to > change it manually on 20 lists. Does anyone see a better way of doing > this? > > Dylan > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]