VinsWorldcom@C:\Users\VinsWorldcom\tmp> cat test.pl use strict; use warnings; use Net::Ping; my $p = Net::Ping->new("tcp", 2); printf "GetServByName = %s\n", getservbyname("http", "tcp"); # Explicitly use the HTTP port number $p->port_number(80); if ($p->ping("www.google.com")) { print "Host is reachable\n"; } else { print "Host is not reachable\n"; } VinsWorldcom@C:\Users\VinsWorldcom\tmp> test.pl GetServByName = http Host is reachable