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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://942291]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-03-29 12:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found