in reply to Re: Can't remove directory-Permission denied
in thread Can't remove directory-Permission denied
return unless /[^.]/;
I'm not unsure that it isn't impossible to avoid not including more negations without having to avoid a lack of not trying.
return if /^\.{1,2}\z/;
The 'return' still represents one implied negation ("don't do the following"). Each additional negation adds the chance for mentally dropping the negation and introducing a bug or wasting too much time getting very confused.
It also doesn't skip directories named "...". :) And, of course, that code is assuming a Unix or Windows file system.
- tye
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Can't remove directory-Permission denied (knot)
by Athanasius (Archbishop) on Oct 22, 2012 at 16:42 UTC | |
Re^3: Can't remove directory-Permission denied (knot)
by Lotus1 (Vicar) on Oct 22, 2012 at 15:59 UTC | |
by tye (Sage) on Oct 22, 2012 at 16:23 UTC |