>> this is only a half-solution, but it's fairly easy to find out whether a
>> given /machine/ exists. perl has the built-in routine gethostbyname()
>> which will do a standard DNS lookup for you.
>
>Good routine to have handy, but it doesn't deal with MX records, which
>are increasingly a part of Internet life as more and more people use
>virtual domains (like me!).
good point.. OTOH, on a unix system it's easy enough to drop a subshell and
do the lookup explicitly:
$domain = "att.com";
$l = `nslookup -type=mx $domain`;
@mx = $l =~ /mail exchanger = (\S+)/g;
for $item (@mx) {
@A = gethostbyname($item);
print "name = $A[0]\n";
print "aliases = $A[1]\n";
print "type = $A[2]\n";
print "length = $A[3]\n";
print "address = ", join ('.', unpack ('C4', $A[4])), "\n\n";
}
which is just one of the many reasons why i like working in unix & perl. ;-)
mike stone <[EMAIL PROTECTED]> 'net geek..
been there, done that, have network, will travel.
____________________________________________________________________
--------------------------------------------------------------------
Join The Web Consultants Association : Register on our web site Now
Web Consultants Web Site : http://just4u.com/webconsultants
If you lose the instructions All subscription/unsubscribing can be done
directly from our website for all our lists.
---------------------------------------------------------------------