Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
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 taking refuge in the Monastery: (4)
As of 2014-09-18 03:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (105 votes), past polls