JPaul has asked for the wisdom of the Perl Monks concerning the following question:
The examples state that you can just pass it a hostname (the Perl Cookbook uses "kingkong.com") which perl responds with:
Bad arg length for Socket::unpack_sockaddr_in, length is 0, should be 16 at /usr/lib/perl5/i386-linux/Socket.pm line 295.
I figure that its expected a packed address, but when I feed it something like (And yes, i'm running as root):
The script takes 1/4 of a second to complete, making me very suspicious as to whether anything is happened at all! Increasing the timeout does nothing, and the command still runs for 1/4 of a second.$p = Net::Ping->new('icmp'); print "She's workin" if $p->ping(inet_aton("addr.com")); $p->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Ping just don't werk
by brother ab (Scribe) on Nov 02, 2000 at 13:39 UTC | |
by little (Curate) on Nov 02, 2000 at 14:01 UTC | |
|
Re: Net::Ping just don't werk
by moen (Hermit) on Nov 02, 2000 at 04:42 UTC | |
|
Re: Net::Ping just don't werk
by JPaul (Hermit) on Nov 02, 2000 at 05:16 UTC | |
by geektron (Curate) on Nov 02, 2000 at 05:47 UTC | |
|
Re: Net::Ping just don't werk
by mitd (Curate) on Nov 02, 2000 at 12:44 UTC | |
by mitd (Curate) on Nov 03, 2000 at 02:39 UTC | |
|
Re: Net::Ping just don't werk
by elwarren (Priest) on Nov 02, 2000 at 05:33 UTC | |
|
Re: Net::Ping just don't werk
by Anonymous Monk on Nov 02, 2000 at 04:34 UTC | |
|
Re: Net::Ping just don't werk
by brick (Sexton) on Nov 02, 2000 at 06:14 UTC | |
|
Re: Net::Ping just don't werk
by JPaul (Hermit) on Nov 02, 2000 at 05:36 UTC |