laziness, impatience, and hubris | |
PerlMonks |
Re^3: Find pieces of text in a file enclosed by `@` and replace the insideby bart (Canon) |
on Mar 09, 2013 at 21:27 UTC ( [id://1022625]=note: print w/replies, xml ) | Need Help?? |
I'm not sure what you mean. But I know that $1 and friends are block scoped, meaning that it's safe, and has always been safe, to nest substitutions provided the inner substitution was in a block.
Calling a sub is one safe way to achieve that. It also has the added advantage that you don't have to take care of having to escape any unpaired nested braces: the substitution part may look like a code block to us, but it actually isn't.
In Section
Seekers of Perl Wisdom
|
|