sub config_parse
{
my %CONFIG;
open(CONF,"$_[0]") or die "Can't open $_[0] : $!";
while(<CONF>){
chomp($_);
$_ =~ s/\;(.*)//;
next if($_ eq '');
if($_ =~ /(.+)=(.+)/){
my $key=$1; $key =~ s/^\s+//; $key=~ s/\s+$//;
my $value=$2;$value =~ s/^\s+//;$value =~ s/\s+$//;
$CONFIG{$key}=$value;
}
}
return (\%CONFIG);
}
{
my %CONFIG;
open(CONF,"$_[0]") or die "Can't open $_[0] : $!";
while(<CONF>){
chomp($_);
$_ =~ s/\;(.*)//;
next if($_ eq '');
if($_ =~ /(.+)=(.+)/){
my $key=$1; $key =~ s/^\s+//; $key=~ s/\s+$//;
my $value=$2;$value =~ s/^\s+//;$value =~ s/\s+$//;
$CONFIG{$key}=$value;
}
}
return (\%CONFIG);
}