Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^3: 'grouping' substrings?

by ikegami (Pope)
on Feb 01, 2006 at 16:52 UTC ( #527112=note: print w/ replies, xml ) Need Help??

in reply to Re^2: 'grouping' substrings?
in thread 'grouping' substrings?

That's not exactly true. $& is only inefficient if you have another regexp in your program which doesn't capture.

However, it's use is discouraged, since captures can perform the same task without the "effect at a distance" of $&.

In this case, just replace $& with $1, and you're set.

Comment on Re^3: 'grouping' substrings?
Select or Download Code

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (11)
As of 2016-02-12 09:21 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (394 votes), past polls