in reply to Re^5: Config files
in thread Config files
Thank you for the reply. I understood:
@files = split /\s*,\s*/, $config->{path}{files};
If the arrays can occur at any place in the config file along with scalar values, I did not understand how the following code takes care of that
foreach my $Section (values %$config) { # $Section is a hash ref containing the values of the section, not th +e section name! foreach my $value (qw(files colors and other options that should be +arrays)) { $Section->{$value} = [split /\s*,\s*/, $Section->{$value}]; } }
Actually, I did not understand the following line:
foreach my $value (qw(files colors and other options that should be +arrays)) {
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: Config files
by Jenda (Abbot) on Dec 11, 2004 at 01:17 UTC | |
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 | |
|