(file) Return to testPatterns.pl CVS log (file) (dir) Up to [home] / email2rss

File: [home] / email2rss / testPatterns.pl (download) / (as text)
Revision: 1.1.1.1 (vendor branch), Sat Jun 26 17:57:43 2004 UTC (6 years, 2 months ago) by ws
Branch: vendor, MAIN
CVS Tags: public, HEAD
Changes since 1.1: +0 -0 lines
converts certain emails to rss

#!/usr/bin/perl

my $basedir = "/home/ws/.procmail";

# read patterns from the patterns file
open(FILE, "$basedir/patterns");
my @patterns = <FILE>;
close(FILE);

chomp foreach (@patterns);

open(FILE, "$basedir/log.email");
my @lines = <FILE>;
close(FILE);

foreach my $line (@lines)
{
    foreach my $p (@patterns)
    {
        if ($line =~ /$p/i)
        {
            print "match: $line";
            break;
        }
    }
}
close(FILE);
exit(0);


tony at ponderer dot org
Powered by
ViewCVS 0.9.2