[Mimedefang] Re: how to undo Verisigns mess

John Rowan Littell littejo at earlham.edu
Tue Sep 16 11:28:50 EDT 2003


-----BEGIN PGP SIGNED MESSAGE-----

Lo, Jeremy Mates and the coffee pot sang in unison:

> * John Rowan Littell <littejo at earlham.edu>
> >       $tld = $domain = $address;
> >       $tld =~ s/.*(\.\w+)$/$1/;
> >       $domain =~ s/.*[\@\.](\w+\.\w+)$/$1/;
>
> # why munge with s///, when you can extract?
> # also, hostnames may contain hypens...
> ($domain, $tld) = $address =~ /( [\w-]+ (\.\w+) )$/x;

'Cause that's the dialect of perl I think in... :-)  Good catch;
thanks.  With my other catch, the line above would be:

($domain, $tld) = $address =~ /<?( [\w-]+ (\.\w+) )>?$/x;

  --rowan

- -- 
John "Rowan" Littell
Systems Administrator
Earlham College Computing Services
http://www.earlham.edu/~littejo/
2003-09-16 10:22
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
Comment: Made with pgp4pine 1.76

iQCVAwUBP2cr1ZdUNSJ2nf/5AQEPgwP/Ylnogwagc4OXLNF+jKaIaeJwlqNEN9Ze
m5ZsS5CSUR+r5bVeJFRKwX3Q3c3YLMcd+FWrjymQ6EAe7/Gwok7+gGc8L2z00RvV
qN1K1YTgcvxA0bT3iVRkY4Xt0HhIJH/qNyMAwqVH2H0uP4QfL5dlJ7NDzRiWF2Oi
YyAbegZh2Xs=
=18UZ
-----END PGP SIGNATURE-----




More information about the MIMEDefang mailing list