Gabor Szabo wrote:
err, I don't think that "casting" is the right word to use here. What
{} does here is
disambiguates the expression.
Let me try to summarize what I understood from your excellent explanation:
Putting a modifier in front of a reference dereference it to the right
type ($ for scalar etc.). Alternatively, putting a '->' (which is a
unary operator, not a binary one) also dereferences it, no matter what
it is pointing to.(at least for array and hash), so long as there is
some reference to its content on the operator's right (the same as it is
implemented in C++, only more confusing).
The curly braces act as a scoping operator, making the $/@/% relation to
parts of the expression unique.
All that is left is understanding why the round braces around the whole
expression.
Many thanks (the explanation was very useful)
Shachar
--
Shachar Shemesh
Lingnu Open Source Consulting Ltd.
http://www.lingnu.com
_______________________________________________
Linux-il mailing list
Linux-il@cs.huji.ac.il
http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il