Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: simple array question

by chromatic (Archbishop)
on Jan 03, 2011 at 04:37 UTC ( #880135=note: print w/ replies, xml ) Need Help??


in reply to Re: simple array question
in thread simple array question

Lists are surrounded by brackets....

Not rvalue lists! Commas, not parentheses, produce literal rvalue lists. The three array references in this variant of that code are a list just as much as in the original version:

my @compass = ["NW", "N", "NE"], ["W", "center", "E"], ["SW", "S", "SE"], ;

The difference between the two examples is the precedence of the assignment operator compared to the precedence of the comma operators.


Comment on Re^2: simple array question
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2014-12-20 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (95 votes), past polls