#!/usr/bin/perl # $Id: network.pm,v 1.1 2011/06/03 09:28:47 yason Exp $ package network; use Net::Ping; sub alive($) { my $host = shift; my $p = Net::Ping->new( ); return( $p->ping($host) ? 1 : 0 ); } return(1);