Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Regular expression matching or eq, which is faster?

by citromatik (Curate)
on May 11, 2009 at 10:21 UTC ( #763208=note: print w/replies, xml ) Need Help??


in reply to Regular expression matching or eq, which is faster?

  • If you are looking for equality between two strings, use eq
  • If you need to match against a regular expression, use a regular expression
  • If your regular expression needs to match from the beginning of the string, use the ^ anchor. If your regular expression matches until the end of the string, use the $ anchor

citromatik

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://763208]
help
Chatterbox?
[QM]: choroba, who or what are you hiring?
[choroba]: Perl programmers
[QM]: In Prague? A bit too far away for me.

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2017-06-29 10:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (658 votes). Check out past polls.