in reply to Re^2: Is this the most elegant way to code directory lookup?
in thread Is this the most elegant way to code directory lookup?
There. So much clearer now...not.
Your ability to make something less clear doesn't negate everyone else's ability to make something more clear.
if( ! -d && $_ ne "." && $_ ne ".." ) {
Yes, that prevents a noticeable mental pause that the "unless" version induced. [ Even better, it avoids the mental tension between how "unless" is usually used in English vs. how it is used in Perl and the fact that the unexplicit "not" implied by "unless" is too easy to mentally drop. ]
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Is this the most elegant way to code directory lookup? (!unless)
by ikegami (Patriarch) on Sep 29, 2006 at 16:17 UTC | |
|
Re^4: Is this the most elegant way to code directory lookup? (!unless)
by BrowserUk (Patriarch) on Sep 29, 2006 at 16:55 UTC | |
by tye (Sage) on Sep 29, 2006 at 17:13 UTC |