go ahead... be a heretic | |
PerlMonks |
Re: can substitution operator replace text with value returned from function?by choroba (Cardinal) |
on Jun 11, 2018 at 17:01 UTC ( [id://1216412]=note: print w/replies, xml ) | Need Help?? |
That's why the /e modifier exists. It interprets the replacement part as code and uses the returned value as the substitution. You might need to capture something in the regex and use the corresponding capture group in the replacement code:
In Section
Seekers of Perl Wisdom
|
|