Help for this page
if ($pingObj->ping($IpAddress, 1)){ my $MachineName = uc(gethostbyaddr (inet_aton($IpAddress), AF_INET) +) or "[FAILED]"; ... } else { print "$IpAddress\tNo Response\n" if $VERBOSE; }
# Assuming you won't have a machine named "0" $MachineName = ($MachineName =~ /^(.*?)(-UDP\w*)?\./i)[0] || ($IpAd +dress . '[NULL]');