Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
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 ( #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
Node Status?
node history
Node Type: note [id://719909]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (7)
As of 2014-12-25 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (163 votes), past polls