Hi,
I am looking for a more elegant way to create a hash that contains the list I have read in from my configuration file. Here is my code:
read_config($config_file => my %config);
my $extension_list_reference = $config{extensions}{ext};
my @ext;
# Store each item of the list into an array
for my $i ( 0 .. (@$extension_list_reference - 1) ) {
$ext[$i] = $extension_list_reference->[$i];
}
# Create hash with the array elements as the keys
foreach my $entry (@ext) {
$extensions{$entry} = "include";
}
Thanks.