Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://880135]
help
Chatterbox?
[choroba]: Lady_Aleena Perl's grep is not related to directories
[Your Mother]: It does recurse.
[Lady_Aleena]: choroba, I know.
[Your Mother]: -R, -r, --recursive
[1nickt]: Discipulus, Corion, try this: D.A. Golden's blog
[Lady_Aleena]: Your Mother, that's the command line grep, not perl's grep.
[Your Mother]: …how on Earth could Perl’s grep recurse?
[Tanktalus]: perldigious: I'm not looking to get rich. I'm looking for interesting work, with good continuity of employment, and maintenance of our current lifestyle. (An improvement wouldn't be bad, either, but that's not a requirement ;) )
erix enjoys the confusion++
[Your Mother]: :P

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (11)
As of 2017-05-23 19:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?