Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw

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?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (9)
As of 2016-10-21 14:36 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (289 votes). Check out past polls.