Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^3: 'grouping' substrings?by ikegami (Patriarch) |
on Feb 01, 2006 at 16:52 UTC ( [id://527112]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|