I can't get Net:
ing to work.
Here is my code:
-----------------------------------------------
use Net:
ing;
use Net::FTP;
$host = "hpsab4";
$timeout = 30;
use Net:
ing;
$pong = Net:
ing->new( $> ? "tcp" : "icmp" );
(defined $pong)
or die "Couldn't create Net:
ing object: $!\n";
if ($pong->pingecho($host, 30)) {
print "It works!\n";
} else {
print "You suck!\n";
}
-----------------------------------------------------
Here is the error message:
Argument "hpsab4" isn't numeric in le at /usr/share/lib/perl5/Net/Ping.pm line 78
P.S. I get the same message if I use the IP address for the host variable.
Thanks in advance.
Here is my code:
-----------------------------------------------
use Net:
use Net::FTP;
$host = "hpsab4";
$timeout = 30;
use Net:
$pong = Net:
(defined $pong)
or die "Couldn't create Net:
if ($pong->pingecho($host, 30)) {
print "It works!\n";
} else {
print "You suck!\n";
}
-----------------------------------------------------
Here is the error message:
Argument "hpsab4" isn't numeric in le at /usr/share/lib/perl5/Net/Ping.pm line 78
P.S. I get the same message if I use the IP address for the host variable.
Thanks in advance.