in reply to Using do to read config

Regarding not wanting to write your own parser, it's actually not that bad. I have a little one that I've been using for small config files for awhile; nothing fancy but it works:

sub readConfigFile($){ my $cfgfile = shift; my %cfg; open(CONFIG, $cfgfile) or die " Error opening $cfgfile: $!\n"; while (<CONFIG>) { next if /^\s*$/; next if /^\#/; chomp; next unless /=/; my ($key, $variable) = split(/=/,$_,2); $variable =~ s/(\$(\w+))/$cfg{$2}/g; $cfg{$key} = $variable; } return %cfg; }

In my opinion, this is a nifty and simple little config file parser.