Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^5: If you believe in Lists in Scalar Context, Clap your Hands

by ysth (Canon)
on Oct 28, 2008 at 05:20 UTC ( [id://719909]=note: print w/replies, xml ) Need Help??


in reply to Re^4: If you believe in Lists in Scalar Context, Clap your Hands
in thread If you believe in Lists in Scalar Context, Clap your Hands

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?
  • Comment on Re^5: If you believe in Lists in Scalar Context, Clap your Hands

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://719909]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 02:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found