...
$line++;
($_) = split (/\#/); # remove comments
s/\s*$//; # <--- new, clean end of line from white-space
...
Thanks again to Danny Rice!
...
unless ($config_read) {
# try the home-directory
if ($ENV{'HOME'}) {
$old_dir = $cwd;
chdir $ENV{'HOME'};
if (-r $config_file) {
&read_config;
} else {
chdir $old_dir;
&read_config; # <--- right here.
}
} elsif (-r $config_file) {
...
Thanks to Danny Rice!
...
$^W = $warn_stat; # set back warning status
close (CONFIG);
$relpubdate =~ s/\s//g; # <--- add
$viewdays =~ s/\s//g; # <--- add
$fullmax =~ s/\s//g; # <--- add
$getmax =~ s/\s//g; # <--- add
$config_read = 1;
}
...