Great Circle Associates Majordomo-Users
(February 2000)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: email validator
From: ramon via lepton <ramon @ etown . com>
Date: Mon, 7 Feb 2000 11:54:36 -0800 (PST)
To: Jack Schnapper <jack @ kajor . com>
Cc: Clay Irving <clay @ skechers . com>, majordomo-users @ GreatCircle . COM
In-reply-to: <4.1.20000207073902.009a4db0@kajor.com>


I want to run something like this for many different types of lists. Do I
need to call flock on my majordomo list files to avoid corruption. What
happens when I lock the file and majordomo attempts to write to it?

ramon.


On Mon, 7 Feb 2000, Jack Schnapper wrote:

> I am rather a neophyte when it comes to perl.  Where would I insert this
> module?
> 
> Thanks,
> Jack
> 
> At 05:47 PM 2/4/00 -0800, Clay Irving wrote:
>  
> >On Fri, Feb 04, 2000 at 01:47:35PM -0800, ramon via lepton wrote:
> >
> >> Does anyone have a working email validator for majordomo lists?
> >
> >I use the Perl module Email::Valid to weed out obvious bad addresses:
> >
> >#!/usr/local/bin/perl
> >
> >use Email::Valid;
> >
> >$input_file     = "foo.txt";             # Input file
> >$good_addresses = "good.txt";            # File to store good addresses
> >$bad_addresses  = "bad.txt";             # File to store bad addresses
> >
> >open F, "$input_file" or die "$!\n";
> >open G, ">$good_addresses" or die "$!\n";
> >open R, ">$bad_addresses" or die "$!\n";
> >
> >while ($address = <F>) {                 # Read the list of Email addresses
> >  chomp $address;
> >  $address =~ s/^\s+//;                  # Remove spaces in the Email address
> >  $valid = new Email::Valid;
> >  if ($valid->address( -address => $address)) {
> >    print G "$address\n";                # The address is valid
> >  } else {
> >    print R "$address\n";                # the address is not valid
> >  }
> >}
> >
> >-- 
> >Clay Irving
> >clay@skechers.com
> 



Follow-Ups:
References:
Indexed By Date Previous: Re: email validator
From: ramon via lepton <ramon@etown.com>
Next: Re: email validator
From: Clay Irving <clay@skechers.com>
Indexed By Thread Previous: Re: email validator
From: ramon via lepton <ramon@etown.com>
Next: Re: email validator
From: Clay Irving <clay@skechers.com>

Google
 
Search Internet Search www.greatcircle.com