From: "Spalding, Stephen" <SSpaldin () mem-ins ! com>
To: tru64-unix-managers
Subject: pinging the network from perl
Date: Tue, 09 Feb 1999 20:15:07 +0000 [thread overview]
Message-ID: <96079036515590.tru64-unix-managers.marc@archive.invalid> (raw)
Hello all.
I'm trying to use perl's pingecho command to see if a member of the network
is present in a perl script, and it's not working. I'm using the example
right out of the O'Reilly perl programming book, but it still won't work.
Here is what I'm trying:
use Net::Ping;
$host_name = 'mem2';
$timeout = 10;
print "mem2 is on the network\n" if pingecho($host_name, $timeout);
I've tried varying the structure of the last line, and I've tried varying
how the arguments are displayed in the pingecho statement (adding different
quote marks and putting in actual values instead of variables).
When I run the above lines, the program comes back immediately and does not
even wait for the 10 second timeout. Can anyone see what I'm doing wrong?
Thanks!
-StephenS
Stephen Spalding
Associate System Administrator
Missouri Employers Mutual Insurance
sspaldin@mem-ins.com
1000 West Nifong
Columbia, MO 65203
(573) 499 - 4230
(800) 442 - 0590
fax (573) 499 - 4310
reply other threads:[~1999-02-09 20:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox