Annotation of processmail/checkfrom.pl, revision 2.1

2.1     ! boris       1: #!/usr/bin/perl
        !             2: 
        !             3: use strict;
        !             4: 
        !             5: open (TEAMS, "tmp.res");
        !             6: my %teams;
        !             7: while (<TEAMS>) {
        !             8:     chomp;
        !             9:     s/^\s+//;
        !            10:     s/\s+$//;
        !            11:     $teams{$_}=1;
        !            12: }
        !            13: close TEAMS;
        !            14: 
        !            15: my $name="";
        !            16: while (<>) {
        !            17:     chomp;
        !            18:     s/^\s+//;
        !            19:     s/\s+$//;
        !            20:     if (/^From: (.*)$/) {
        !            21:        $name=$1;
        !            22:        next;
        !            23:     }
        !            24:     if (exists $teams{$_}) {
        !            25:        s/\*\*\*\s+//;
        !            26:        print "$name ($_)\n";
        !            27:        next;
        !            28:     }
        !            29: }
        !            30:        

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>