Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2016-10-28 10:40 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (380 votes). Check out past polls.