"Jeff Pang" schreef:
> Dr.Ruud:

>> No need for (), so you can write:
>>
>>   m/tony|anthony/i
>
> or,
> /tony/i || /anthony/i
>
> this is faster than /tony|anthony/i.

Faster for what? For one, it takes longer to type.

With which version of Perl, and with which exact test data set did you
do your benchmark? How exactly did you benchmark it?



You should also try this then:

  m/[Tt][Oo][Nn][Yy]|[Aa][Nn][Tt][Hh][Oo][Nn][Yy]/

and of course this way too:

  m/[Tt][Oo][Nn][Yy]/ || m/[Aa][Nn][Tt][Hh][Oo][Nn][Yy]/

-- 
Affijn, Ruud

"Gewoon is een tijger."


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


Reply via email to