in reply to This is why Perl is so frustrating

"AM I MISSING A FUNDAMENTAL ASPECT OF LOGICAL OPERATIONS?"

Apparently, this happens:
$file = "."
if ($file ne "." ) (evaluates to true) or ($file ne "..")
(evaluates to false)
false or true = true?
I thought that was &&

Replies are listed 'Best First'.
Re^2: This is why Perl is so frustrating
by eggmatters (Initiate) on Jul 29, 2009 at 18:13 UTC
    Yes I got it backwards. Argghhh. Now I am eating some crow. Just so you know, we're under a massive heatwave and I have very little sleep with a newborn. This all makes me cranky and irritable and dyslexic and dumb. Sorry but Thanks for the prompt and helpful replies!! Perl is ok again!!
Re^2: This is why Perl is so frustrating
by jrsimmon (Hermit) on Jul 29, 2009 at 18:15 UTC

    That would be the fundamental aspect of logical operations which you have missed.

    (A||B) evaluates to true if either A or B are true.
    (A&&B) evaluates to true if and only if (iff) A and B are both true.