in reply to
Doing TCP or UDP pings is often useless since most machines
(at least these days) don't service the TCP/UDP echo
services. This type of "ping" is like trying to telnet
to port 7 of a machine. Most of the time this will just
get you "connection refused" because nothing listens to
that port on so many machines. But since UDP is not
connection oriented, you can't get "connection refused"
so the ping just fails.
So you want to do Net::Ping->new("icmp"), which
works for me. You need to get at 0+$! in order
to understand what "unknown error" really is so we can
figure out what is going wrong. Either modify Ping.pm so
that it reports this or use the Perl debugger to step into
Ping.pm and query what that value is. Perhaps you have to
be "administrator" in order to use ICMP under WinNT?
(but my friends call me "Tye")