From 7662b1065e85874ceee234701d93aa50a1cde408 Mon Sep 17 00:00:00 2001 From: Thomas Hochstein Date: Sun, 27 May 2012 15:33:11 +0200 Subject: [PATCH 1/1] 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 --- NewsStats.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1