RE: Problem with Net::Ping to DFS cluster
"Oeschey, Lars (I/ET-83, extern)" <[email protected]> Fri, 27 Apr 2012 11:47:33 +0200
| Newsgroups | gmane.comp.lang.perl.active-perl |
|---|---|
| Message-ID | <[email protected]> |
> I would try one of Net::DNS::Resolver, gethostbyname,
> Net::hostent:gethost
> or ?? to convert the alias to an IP addr - kinda depends on where the
> alias gets resolved - who the heck knows the correlation between the
> alias name and the IP addr and maybe that needs to be changed (eg:
> propagated to a name server or added to each computer's hosts file).
Ok, this gets weird... I did a gethostbyname before the ping, and it still doesn't work:
my $packedip = gethostbyname($pinghost);
if (defined $packedip) {
$ip_address = inet_ntoa($packedip);
print $ip_address;
}
my $p = Net::Ping->new();
if (!$p->ping($ip_address)) {
print "\ncan't reach $ip_address: no network? Exiting!\n";
print "\nPress any key to continue...";
ReadMode('cbreak');
my $key = ReadKey(0);
ReadMode('normal');
exit;
}
The ip adress that it gives me just pings fine in the DOS-Box...
Lars
_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs