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

Re^2: Showing why a Regexp didn't match

by hipowls (Curate)
on Apr 12, 2008 at 02:05 UTC ( #679915=note: print w/ replies, xml ) Need Help??


in reply to Re: Showing why a Regexp didn't match
in thread Showing why a Regexp didn't match

Generally you should avoid using $', $& and $'. Once they appear in your program they slow down all regular expression calls.
This is true and good advice but if you are using perl 5.10.0 or later there is the option of using /P and the variables ${^PREMATCH}, {$^MATCH}, and ${^POSTMATCH} where the cost is confined to only the regular expressions that use them.

In this case, though, there doesn't appear to be any advantage to using /P.


Comment on Re^2: Showing why a Regexp didn't match
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://679915]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2015-08-03 10:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The oldest computer book still on my shelves (or on my digital media) is ...













    Results (30 votes), past polls