David F. Skoll wrote:
> On Wed, 8 Sep 2004, Ted Beaton wrote:
> 
>>               if ($recip = [EMAIL PROTECTED]) {
> 
> That's invalid perl.  Should be:
> 
>       if ($recip eq '<[EMAIL PROTECTED]>') {
> 

Can the @Recipients collection be counted upon to have <> and lc pre-applied?
Erring on the side of caution I'd go with something like

        if ($recip =~ /^<[EMAIL PROTECTED]>?$/i) {

myself.

Or maybe do something like

sub canonify_email($);
... and then ...
        if (    canonify_email($recip) eq
                canonify_email('[EMAIL PROTECTED]')
        ) {
... and finally ...
sub canonify_email($)
{       my $raw_email = shift;
        my $canonical_email = $raw_email;

        # subject $canonical_email to various tortuous manipulations here...
        $canonical_email = lc $canonical_email; # transform uppercase to lowercase
        $canonical_email =~ s/"[^"]*"//g; # take out anything in quotes
        $canonical_email =~ s/^\s*//; # remove initial whitespace
        $canonical_email =~ s/^<//; # remove initial <
        $canonical_email =~ s/>$//; # remove final >
        ... etc (haven't reread RFC's in a while)

        return $canonical_email;
}

[EMAIL PROTECTED]                      805.964.4554 x902
Hispanic Business Inc./HireDiversity.com         Software Engineer
perl -e"map{y/a-z/l-za-k/;print}shift" "Jjhi pcdiwtg Ptga wprztg,"

_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to