Index: lib/MDK/Common/System.pm =================================================================== --- lib/MDK/Common/System.pm (revision 253848) +++ lib/MDK/Common/System.pm (working copy) @@ -338,10 +338,15 @@ open(my $F, $_[0]) or return; local $_; while (<$F>) { - s/#.*//; # remove comments + s/^\s*#.*//; # remove comment-only lines s/^\s*//; # leading space my ($v, $val) = /^(\w+)=(.*)/ or next; - $val = $1 if $val =~ /^"(.*)"$/ || $val =~ /^'(.*)'$/; + if ($val =~ /^"(.*)"(\s+#.*)?$/) { + $val = $1; + } elsif ($val =~ /^'(.*)'(\s+#.*)?$/) { + $val = $1; + $val =~ s/(^|[^'])'\\''/$1'/g; + } $l{$v} = $val; } %l;