open CONFIG, "main.cfg" or die $!; while () { chomp; s/\/\*.*//; s/^\s+//; s/\s+$//; next unless length; my ($key, $value) = split(/\s*=\s*, $_, 2); $config{$key} = $value; } #main cfg Name = Froschpopo