Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: difference between @, $

by JavaFan (Canon)
on Dec 07, 2011 at 17:30 UTC ( #942291=note: print w/replies, xml ) Need Help??


in reply to Re: difference between @, $
in thread difference between @, $

Note, the parenthesis indicate that a regular array initialisation is being carried out.
Eh, no. The list assignment actually stems from the LHS of the assignment being an array, not from the RHS having parens. The parens are needed because the comma has a lower precedence than the assignment operator.
$a = (1, 2); # Parens, but scalar assignment @a = 1; # No parens, but list assignment

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2016-09-25 11:27 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (470 votes). Check out past polls.