You probably don't want to use Net::Ping to this as this will use the TCP echo service and all you are doing is changing the port to which it tries to connect to this service. I would suggest if you just want to check whether you have a particular port open on a particular machine you do something like:
use IO::Socket; + my $sock = IO::Socket::INET->new(PeerAddr => 'localhost', PeerPort => 'http(80)', Proto => 'tcp'); + + print $sock ? "alive" : "not alive";
/J\
In reply to Re: net ping question
by gellyfish
in thread net ping question
by perlknight
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |