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

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://527112]
help
Chatterbox?
[talexb]: Great quote from Re: (OT) Motivating the Unmotivated Programmer: "As Weinberg suggests, when a programmer becomes irreplaceable, it's time to replace him."
[jedikaiti]: SuicideJunkie++ #Apgrade is the highest point it will reach. They're informing you that it will all be downhill from here until the software hits a PEgrade, or impacts the terrain depending on the details of the orbit.

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (8)
As of 2017-07-25 18:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (377 votes). Check out past polls.