Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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

Comment on Re^2: difference between @, $
Download Code

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 taking refuge in the Monastery: (7)
As of 2015-10-09 11:10 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (239 votes), past polls