in reply to Re^6: Config files
in thread Config files
qw(foo bar baz) means the same as ('foo', 'bar', 'baz'). The inner loop loops through the names of the options that you want to split.
The thing is that if you split everything that contains the delimiters you run into problems. You'd have to check all the time whether $config->{sectionName}{valueName} is a scalar or an array ref. That'd be inconvenient. So it's better to split the options that may contain multiple values (even if they don't in some case) and leave the others intact. So that you can be sure $config->{path}{root} is a string and $config->{path}{files} is an array (ref).
Jenda
|
We'd like to help you learn to help yourself Look around you, all you see are sympathetic eyes Stroll around the grounds until you feel at home -- P. Simon in Mrs. Robinson |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Config files
by sparkel (Acolyte) on Dec 11, 2004 at 01:30 UTC | |
by Jenda (Abbot) on Dec 11, 2004 at 17:33 UTC | |
by sparkel (Acolyte) on Dec 11, 2004 at 23:52 UTC | |
by Jenda (Abbot) on Dec 12, 2004 at 00:24 UTC | |
by sparkel (Acolyte) on Dec 12, 2004 at 00:39 UTC | |
|