summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-06-27 13:15:14 +0000
committerivan <ivan>2003-06-27 13:15:14 +0000
commit766daf46f28869a1199056ef3a5335eaa0f93154 (patch)
treea3c37fad80484216d8d82c5ced5a1707102efbd9
parenteba5174dfaa672cd1622befeebf7c3f5812ffe72 (diff)
adding silly mailall script
-rwxr-xr-xmailall.pl20
1 files changed, 20 insertions, 0 deletions
diff --git a/mailall.pl b/mailall.pl
new file mode 100755
index 0000000..449e967
--- /dev/null
+++ b/mailall.pl
@@ -0,0 +1,20 @@
+#!/usr/bin/perl -w
+use strict;
+
+my $data_dir = shift @ARGV;
+
+my $n = 0;
+my %address;
+
+foreach my $file ( glob("$data_dir/*") ) {
+ open(FILE,"<$file") or die $!;
+ while (<FILE>) {
+ /\b(\w[\w\-\.\+]*\@(([\w\.\-]+\.)+\w+))\b/ or warn "can't parse line: $_\n";
+ $address{lc($1)}=1;
+ $n++;
+ }
+}
+
+print scalar(keys(%address)), " ($n)\n";
+print join(",",keys %address),"\n";
+