Harry Putnam <reader@newsguy.com> writes:
>> Or perhaps:
>>
>> return if $File::Find::dir !~ /$dir_rgx/;
>>
>
> Thanks.
>
>>> or
>>> Like I've done in he code below. Just let the dir_rgx be a selector
>>> and not worry about pulling the next line immediately.
>>>
>>> I've thought about using `stat' to allow only directories into the
>>> first directory based test as a further way to help focus things. But
>>> not sure any of this will help speed things up.
>>
>> $File::Find::dir will *only* contain directory names so such a test is
>> not needed.
>
> This isn't the kind of test I meant. I'm talking about testing to see
> if the directory matches a regex of directories to search.
Oh crap... sorry.. I didn't really read what statement of mine you
were referencing there... and you point is well taken.
A moments thought would have told me as much.
My script does test for the directory name as well... hence my self
induced inability to ready your reply.
|