#!/usr/local/bin/perl -w use strict; use Net::Ping; warn "Code is untested"; my $host="192.168.100.12"; my $p=Net::Ping->new('tcp'); $p->{'port_num'}=80; echo "$host is alive!\n" if $p->ping($host);