in reply to This is why Perl is so frustrating
if (($file ne ".") or ($file ne ".."))
Will always be true, because no single value of $file can ever match both "." and "..". So yes, you are missing a fundamental aspect of logical operations.
Namely: For a given A != B, (!A or !B) == !(A && B), which will always be true for any single value.
Update:
Perhaps you should spend some time reading this article.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: This is why Perl is so frustrating
by ikegami (Patriarch) on Jul 29, 2009 at 23:03 UTC | |
by jrsimmon (Hermit) on Jul 30, 2009 at 01:06 UTC |