|
|
| Perl: the Markov chain saw | |
| PerlMonks |
Re: Parens mess up regex substituteby Crackers2 (Vicar) |
| on Jan 26, 2012 at 16:14 UTC ( #950154=note: print w/ replies, xml ) | Need Help?? |
|
While all of the above answers are correct, I think they may be slightly missing the point of your question. What I understand you're asking is: "Why do the parens in $str do not screw up
but do screw up
?" And the answer to that is: they don't. It's not the parens in $str that are the problem in the second substitution, it's the parens in $name
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||