Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Regex stored in a scalarby atcroft (Abbot) |
on Aug 22, 2015 at 06:15 UTC ( [id://1139476]=note: print w/replies, xml ) | Need Help?? |
I wanted to do something similar to this recently, but with the left and right-hand patterns stored in a database. The problem I ran into, however, was if I tried to use capture variables, such as the following (contrived) example:
Output, expected:
Output, actual:
If the value for the rh key is changed to use the qq operator, then "uninitialized value $1 in concatenation" messages appears, and the final string becomes 'asdf____jk'. Any suggestions?
In Section
Seekers of Perl Wisdom
|
|