From: Thomas Hochstein Date: Sun, 27 May 2012 13:33:11 +0000 (+0200) Subject: Be more fault-tolerant when reading checkgroups. X-Git-Tag: 0.01~1^2~7^2~3 X-Git-Url: https://code.th-h.de/?p=usenet%2Fnewsstats.git;a=commitdiff_plain;h=7662b1065e85874ceee234701d93aa50a1cde408 Be more fault-tolerant when reading checkgroups. * Accept lines starting with whitespace. * Drop empty "groups", i.e. lines containing only whitespace. Signed-off-by: Thomas Hochstein --- diff --git a/NewsStats.pm b/NewsStats.pm index f0a4066..428719e 100644 --- a/NewsStats.pm +++ b/NewsStats.pm @@ -230,8 +230,9 @@ sub ReadGroupList { my %ValidGroups; open (my $LIST,"<$Filename") or &Bleat(2,"Cannot read $Filename: $!"); while (<$LIST>) { - s/^(\S+).*$/$1/; + s/^\s*(\S+).*$/$1/; chomp; + next if /^$/; $ValidGroups{$_} = '1'; }; close $LIST;