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.
In reply to Re: This is why Perl is so frustrating
by jrsimmon
in thread This is why Perl is so frustrating
by eggmatters
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |