in reply to Re^3: To initialise or not to initialise?
in thread To initialise or not to initialise?
As obscure as the last one is, I'd prefer it over the others if you think that the variable list will expand since you don't have to synchronize the number of variables with a hard-coded constant.my ($foo, $bar, $baz) = map "default", 1..3; $_="default" for my ($foo, $bar, $baz);
That is, if I wanted to achieve this effect. Which I never have needed to.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: To initialise or not to initialise?
by runrig (Abbot) on Jun 24, 2004 at 23:14 UTC | |
by tilly (Archbishop) on Jun 24, 2004 at 23:19 UTC | |
by runrig (Abbot) on Jun 24, 2004 at 23:27 UTC | |
by tilly (Archbishop) on Jun 24, 2004 at 23:30 UTC | |
by Hofmator (Curate) on Jun 25, 2004 at 08:42 UTC | |
by runrig (Abbot) on Jun 25, 2004 at 18:25 UTC | |
| |
by demerphq (Chancellor) on Jun 28, 2004 at 14:00 UTC |