On Thu, 13 Nov 2003 16:19:32 -0500, Jimstone77 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; > } > }
Doesn't this work? I would have inserted a 'last' in the loop, though, and chomp'ed the $_; while ( <FILE> ) { chomp; if ( $email eq $_ ) { $OK = 1; last; } } -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]