X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0aea1ede8f4e69d7677f93944f74e29eb5ce7aa4..dc3cd296e62eb09a16fa694d9b3a7158e4cf63bf:/SL/Inifile.pm diff --git a/SL/Inifile.pm b/SL/Inifile.pm index aadec0af1..2331ca771 100644 --- a/SL/Inifile.pm +++ b/SL/Inifile.pm @@ -40,7 +40,7 @@ use IO::File; sub new { $main::lxdebug->enter_sub(); - my ($type, $file) = @_; + my ($type, $file, %options) = @_; my $id = ""; my $skip; @@ -54,12 +54,16 @@ sub new { while () { chomp; - # strip comments - s/#.*//g; + if (!$options{verbatim}) { + # strip comments + s/\#.*//; - # remove any trailing whitespace - s/^\s*//; - s/\s*$//; + # remove any trailing whitespace + s/^\s*//; + s/\s*$//; + } else { + next if (m/^\s*\#/); + } next unless $_;