Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^5: List assignment in scalar context

by jonadab (Parson)
on Jan 11, 2005 at 00:15 UTC ( #421150=note: print w/replies, xml ) Need Help??


in reply to Re^4: List assignment in scalar context
in thread List assignment in scalar context

Since @x isn't a scalar, it shouldn't affect the count of $n2 because I have scalar = list = list = list

No, you don't. You have scalar = array = list = list, which, as far as the scalar is concerned, reduces to scalar = array, after the array is assigned its value. An array is not a list. The Camel is quite clear on that point. It's also clear on what an array returns in scalar context. No surprises there.

  • Comment on Re^5: List assignment in scalar context

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2021-09-17 23:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?