P is for Practical | |
PerlMonks |
Re: Side effects of an /e modifierby k-mx (Scribe) |
on Jan 29, 2020 at 17:17 UTC ( [id://11112028]=note: print w/replies, xml ) | Need Help?? |
Yet another solution (: You can eval random code inside (?{ }) and use result with variable $^R $bar =~ s#\d{2}(?{ $& * 5})#<td>$^R</td>#gms;More information:
And I want to point, that you don't need to capture whole match. It will already situated in $& P.S.I should have said, that there is global performance penalty for using $& somewhere in your code. It was fixed only in 5.020 Please read following documentation for more information:
In Section
Seekers of Perl Wisdom
|
|