in reply to Re^3: Hash initialization works, but why?
in thread Hash initialization works, but why?
It gets more confusing (but then it gets more clear).
@foo is an array
Yes.
while (1,2,3) is a list
1, 2, 3 is a list. The parentheses have nothing to do with its listishness. The parentheses are there only so that the parser doesn't parse the whole expression as:
(@foo = 1), 2, 3;... as it would if there were no grouping parentheses. They indicate which list you want to assign.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Hash initialization works, but why?
by throop (Chaplain) on Jun 05, 2008 at 14:14 UTC |