Subject: Re: opposite.
From: [email-masked] ($Bill Luebkert)

20 Jan 1998 23:26:38 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
To: "mark.g.franz" <[email-masked]>,
        "[email-masked]" <[email-masked]>

mark.g.franz wrote:
> 
> I had a difficult time getting 'ne' to work on a script last week, I
> ended up setting a quick variable, then checking to see that it wasn't
> true,
> 
> while (<DATA>) {
> if ($name eq $uname) {
> $nodata = "no";       # This is important, tricks the system to check
> for a match, if none found, then run MORE STUFF
> print STUFF "
> "
> last;
>         } # end if
> else {
>         $nodata = "yes";
>         }  #end else;
> } # End WHILE
> close DATA;
> if ($nodata eq "yes") {
> print MORE STUFF"
> "
> } # End IF

This makes no sense at all.  If "ne" fails, (ie: skips to } or else), it's because the 
2 strings are the same.  The same is true for "eq", if it fails and goes to } 
or else, it's because the 2 strings don't match.

The main reason for people thinking they are failing, is probably because 
there is "invisible" stuff in one or both strings causing an apparent 
failure of the if when really the failure is not a failure at all but 
just a match/mismatch (depending on whether you're using eq or ne) in the 
2 strings.

I challenge you to post a script that fails eq or ne when it shouldn't.
Make sure you provide the data file if not local data.

-- 
  ,-/-  __      _  _         $Bill Luebkert
 (_/   /  )    // //       DBE Collectibles
  / ) /--<  o // //      http://www.wgn.net/~dbe/
-/-' /___/_<_</_</_    Mailto:[email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".