|XP is just a number|
Re^2: Using SprintF in S & Rby afoken (Canon)
|on Jul 11, 2017 at 20:37 UTC||Need Help??|
The right hand side of s/// does not execute code unless you use the "e" modifier.
Would you bet your money on that statement? I would not.
You are right, s/// usually does not execute code without the /e modifier. But Perl would not be Perl if you could not mess around with that. Note that even if you could mess with perl, you probably should not.
But there is also a way without tie magic. Dereferencing an anonymous array reference:
Both tricks (ab)use the fact that s/// interpolates the replacement expression, unless you force it not to do so (using ' as the delimiter instead of /).
Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)