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
In reply to Re^2: difference between @, $
by JavaFan
in thread difference between @, $
by soubalaji
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |