#!/usr/bin/perl use strict; use warnings; use Net::Ping; #tcp dosn't require root privileges my $p = Net::Ping->new('tcp'); $p->tcp_service_check(1); my $host = "192.168.0.1"; my $port = 80; $p->{'port_num'} = $port; print "The service on $host port $port is ", ($p->ping($host) ? "up" : "down"), ".\n";
In reply to Re: net:ping problem
by zentara
in thread net:ping problem
by aixmike
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |