in reply to (RFC) Arrays: A Tutorial/Reference
Note that omitting the parentheses is bad style, if your goal is actually to assign the one-element list (0) to the array.
Nit: it doesn't really matter, for one-element lists. There's no difference between a one-element list with and without parentheses. Parentheses don't create lists--they group comma-separated expressions.
The reason you need parentheses in:
my @fib_nums = 1, 1, 2, 3, 5;... is to disambiguate precedence, not to construct a list.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: (RFC) Arrays: A Tutorial/Reference
by shmem (Chancellor) on Jan 13, 2007 at 10:51 UTC | |
by chromatic (Archbishop) on Jan 13, 2007 at 19:23 UTC | |
by shmem (Chancellor) on Jan 13, 2007 at 20:16 UTC | |
by rir (Vicar) on Jan 15, 2007 at 03:52 UTC | |
by shmem (Chancellor) on Jan 15, 2007 at 08:24 UTC | |
| |
|
Re^2: (RFC) Arrays: A Tutorial/Reference
by jdporter (Paladin) on Jan 13, 2007 at 16:40 UTC |