XP is just a number | |
PerlMonks |
Re^2: Regexp substitution using variablesby MikeTaylor (Acolyte) |
on Nov 25, 2020 at 22:47 UTC ( [id://11124235]=note: print w/replies, xml ) | Need Help?? |
Thanks, Ken, this is helpful. Point taken on Class->new, too.
The problem with this class, like the solutions above that use s/(?$flags:$pattern)/$replacement/ directly, is that it doesn't handle back-references. (That's true even with the \Q removed from the definition of $re_part in the class constructor.
In Section
Seekers of Perl Wisdom
|
|