in reply to This is why Perl is so frustrating
You need to 'and', not 'or'. The way it's written (or), first time through, $file = '.', which makes the first half of the if statement false. However, $file = '.', so it can't equal '..', which makes the second part of the if statement true ($file ne '..' <==, yes, that's correct, because $file = '.'). Now you OR 1 and 0 and get a true condition; thus execute the if statement.
|
|---|