X-Git-Url: http://git.ipfire.org/?p=people%2Fstevee%2Fguardian.git;a=blobdiff_plain;f=modules%2FConfig.pm;h=569b2ceb99da109242265b772d13e66eff9f6795;hp=9a8e1fd582e6f7a7ee6fcb70e6f47c5ad383ac50;hb=27d5834858941640a5bdd2b40f82739710e0ddb9;hpb=fc555263db7fbb79ab3fe1f15476f72bdb546947 diff --git a/modules/Config.pm b/modules/Config.pm index 9a8e1fd..569b2ce 100644 --- a/modules/Config.pm +++ b/modules/Config.pm @@ -91,15 +91,14 @@ sub ReadConfig ($) { # Remove any newlines. chomp($line); - # Remove any spaces at the start and end of the line. - $line =~ s/^\s*//; - $line =~ s/\s*$//; - # Check line lenght, skip it, if it is longer than, the # allowed maximum. my $length = length("$line"); next if ($length gt $maxlength); + # Remove any whitespaces. + $line=~ s/ //g; + # Splitt line into two parts. my ($option, $value) = split (/=/, $line);