On 08/04/2016 08:47 PM, Zefram wrote: > Timo Paulssen via RT wrote: >> You can only assign to a Scalar. > How? Specifically, in the situation where I have a Scalar as a value, > stored in a variable or as a sub parameter. How do I assign into it? > The usual assignment operator, if applied to the variable or parameter, > assigns to that variable (or fails to assign to the parameter). > It shouldn't do otherwise, of course. Some other operator is required > to store into a Scalar. > > -zefram
Well, assignment is implemented by calling .STORE on the scalar. Don't forget that unless you "is rw" or "is raw" a parameter, you'll get a new scalar that has the same value, but won't allow you to write to it. (using a sigil-less parameter is equivalent to "is raw"). It was not correct to say "only assign to scalars", as there's also LexicalRef, NativeRef, Proxy, ... The assignment operator is the operator to store into a Scalar. I'm getting the feeling we're not getting through to each other :)
