File:  [Local Repository] / processmail / Attic / checkfrom.pl
Revision 2.1: download - view: text, annotated - select for diffs - revision graph
Mon Jan 24 03:16:35 2005 UTC (19 years, 5 months ago) by boris
Branches: MAIN
CVS tags: HEAD
Added new files

    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>