Help for this page

Select Code to Download


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