#!/usr/bin/perl -w # e-mail verification with CPAN modules # written, with code from the CPAN example, by J K Hoffman aka RyuMaou on 1-10-07 # (Incidentally, he has a wacky blog at http://www.ryumaou.com/hoffman/netgeek/ # In case you were interested.) our $MAILFILE = $ARGV[0]; use strict; use Mail::CheckUser qw(check_email last_check); # What time are we going to start this mess? my $st = localtime; print "Process started at $st\n"; my $FILE = <>; # Read the mail file open(FILE,"$MAILFILE"); my @FILE = ; close(FILE); # Now, down to business... # Actually check the e-mail addresses print "Valid e-mail files verified against mail host\n"; foreach $FILE(@FILE) { if(check_email($FILE)) { print "$FILE"; } } # What time did it end? my $et = localtime; print "Process ended at $et\n";