|
|
| Do you know where your variables are? | |
| PerlMonks |
Re: Parens mess up regex substituteby Anonymous Monk |
| on Jan 26, 2012 at 04:12 UTC ( #950020=note: print w/ replies, xml ) | Need Help?? |
|
Because in perl's regular expression language parens have meaning, they're meta characters, specifically, they're called capturing parens. Anything matched in capturing parens, is stored in a number variable ($1,$2 ...) To see how the regex engine does matching, use re 'debug';
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||