You could also use Config::General with interpolation turned on (see Config::General::Interpolated for full documentation).
# configfile
InstallDir = /usr/local/me
cfgFile = $InstallDir/conf/me.cfg
##################################################
#!perl
use strict;
use warnings;
use Data::Dumper;
use Config::General;
my $conf = new Config::General(
-ConfigFile => 'configfile',
-InterPolateVars => 1
);
print Dumper($conf->{'DefaultConfig'});
__END__
# ouptut ($VAR1 is $conf->{'DefaultConfig'}) :
$VAR1 = {
'cfgFile' => '/usr/local/me/conf/me.cfg',
'InstallDir' => '/usr/local/me'
};
Cheers!
--
hiseldl
What time is it? It's Camel Time!