Mathew schreef:
> Dr.Ruud wrote:
>> Thomas Bätzler schreef:
>>
>>> [ !/^\.$|^\.\.$/  and  !/^\.\.?$/ ]
>>> I'm assuming that this regex would be faster, too, since it
>>> does not contain an alternation.
>>
>> That is hard to say without actual benchmarking: the regex-optimizer
>> gets better with every new version of perl.
>>
>
> But wouldn't that only look for the parent director file?  Isn't it
> looking for a file with exactly two dots?

No, "?" means "{0,1}", see `perldoc perlre`.

-- 
Affijn, Ruud

"Gewoon is een tijger."



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to