> I know this must be a stupid question but: It is not! :)
> Let's suppose I am matching for one of > multiple matches. Is it better/faster to > split it into several pattern matches or > just keep it one match? > > ie: which would be better/faster? If matches can usually be found near the beginning, then: > /:\s*$|^\n$|\*|etc/; is faster. However, due to the way regexs in Perl work, the following is faster in general: > /:\s*$/ || /^\n$/ || /\*/ || /etc/ especially when you put the most likely matches towards the left. This topic is better covered in the Camel on page 189. So, this is DEFINATELY NOT a stupid question since Perl's authors have considered it worthy of the best Perl book out there! Take care, Jonathan Paton __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]