You need to escape the '@' in your variable:

/***************
open(FILE, "<file1");

$email = "[EMAIL PROTECTED]";


while (<FILE>) { print;

print if (/$email/);

#  $OK = 1 if /$email/;
}
*****************/


At 04:19 PM 11/13/03 -0500, you wrote:
I have a list of email addresses in a text file one to a line. How would I
seach for a particular email address?

$email = "[EMAIL PROTECTED]";

while <FILE> {
   if ($email eq $_) {
     $OK = 1;
   }
}

It seems the @ symbol somehow doesn't work in this search. What would be a
better (or right) way to do this? thanks in advance.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to