more useful options | |
PerlMonks |
Re^5: If you believe in Lists in Scalar Context, Clap your Handsby ysth (Canon) |
on Oct 28, 2008 at 05:20 UTC ( [id://719909]=note: print w/replies, xml ) | Need Help?? |
I think the inner consistency you are missing is that operands aren't only values, they can be operations as well. The left = (the scalar assignment) has as its right operand not the "result of [the list] assignment", but rather the list assigment operation. And that operation, by virtue of being the right side of a scalar assignment, gets scalar context, and the "result" of a list assignment in scalar context is the number of elements on the right of the assignment. Does that help at all?
In Section
Meditations
|
|