Are you sure it's faster?
I have benchmarked this before. It is faster. With short matches, regexes are often faster. /^#/ is faster than substr($_, 0, 1) eq '#'. (all assuming you'll have more non-matches than matches, which is true when checking when checking for . and ..)
- Yes, I reinvent wheels.
- Spam: Visit eurotraQ.
In reply to Re: •Re: Re: •Re: Re: Create a list of directories without . and ..
by Juerd
in thread Create a list of directories without . and ..
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |