On 7/24/06, joseph tacuyan wrote:
How can rewrite it, so even it encounters such an error it would still
continue? Thank you for all the help.

Change this:
my $name = gethostbyaddr(inet_aton($address), AF_INET)
          or die "Can't resolve $address: $!\n";
print OUTPUT "$_ =>$name \n";

to:
my $name = gethostbyaddr(inet_aton($address), AF_INET);
if ($name) {
  print OUTPUT "$_ =>$name \n";
} else {
  warn "Can't resolve $address: $!\n";
}

HTH,
--
Offer Kaye

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to