Hello everyone, I was able to track down the original issue. It was not in this line of code. However, I do know that I have this code on another script and occasionally --- not following any rhyme or reason --- does declare of false negative. Thank you, Bill $Bill Luebkert wrote: Bill Platt wrote:I am trying to validate email addresses.I have the following code which succeeds in most cases: if ($in{email} !~ /[EMAIL PROTECTED]/i) If the username part of the email address contains either a "." or a "-", this code fails. Can you tell me why it would fail, and how I could change it to make it work for me?Always submit a complete failing snippet. Seems ok to me: use strict; use warnings; foreach my $email ('[EMAIL PROTECTED]', '[EMAIL PROTECTED]', '[EMAIL PROTECTED]', ) { if ($email !~ /[EMAIL PROTECTED]/i) { print "'$email' bad\n"; } else { print "'$email' good\n"; } } __END__ '[EMAIL PROTECTED]' good '[EMAIL PROTECTED]' good '[EMAIL PROTECTED]' good |
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs