Please choose a subject that is reflective of your post and start a new
thread when appropriate...

> 
> 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]";
> 

The @ in the above does need to be escaped as you indicate, or use
single quotes around it to prevent variable interpolation. 

> 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.
> 

Careful with the above, as you may need to chomp $_, etc. You may also
want to have a look at:

perldoc -f grep

Where is your 'use strict; use warnings;'??

http://danconia.org


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

Reply via email to