in reply to Modify a variable within curly braces (ASCII Sequence))
In your code, ";${$a+=10}" evaluates the $a part, replacing it by it's value, 5, but , by default, string interpolation does not do math.
The other issue is that you are attempting to de-reference (because you use ${...}) something that is not a reference - it is the string "5+=10".
update Oops: BrowserUk has presented the "dereferencing a block" loophole, that allows interpolation, which, apparently you were familiar with. Ignore this post.
Syntactic sugar causes cancer of the semicolon. --Alan Perlis
|
|---|