Don't diddle with $_ so much... You make things more confusing....  Here is
what I see (forgive any formatting errors, using Lotus NOTes)...

while(<FILE>) {
   $line = $_;   # You are setting $line to the current value from <FILE>
   chomp($line); # Getting rid of \n's etc.. (EOL chars)

  # Now here, why are you changing $_?
   $_ = $name_passed; # name is the argument passed to this script

  ## So here, you are looking for a match of $LINE in $_.  You have this
backwards because you are looking for an instance of "name_passed" in the
line...
   if (/$line/) {
       print "yes\n";
       exit 0;
   }
}
print "no\n";


Let's try something like this...

while(<FILE>) {
   chomp;
   if (/$name_passed/) {
       print "yes\n";
       exit 0;
   }
}
print "no\n";


In this example, the current line is passed in <FILE> to $_
The chomp chomps $_
The "if" checks for an instance of $name_passed in $_

The rest is the same....


Good luck!
Brent





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

Reply via email to