#!/usr/bin/perl use strict; # important pragma use warnings; # another important pragma my @hostname; @hostname = ('any_near_by_machine'); use Net::Ping; my $p = Net::Ping->new("icmp") || die "Error in creating a new ping ob +ject" ; my $temp=$p->ping($hostname[0],3)||die "Error when i ping"; if ($temp) { print "Perfect"; } else { print "Imperfect"; }
In reply to Re: icmp socket error
by sasikumar
in thread icmp socket error
by anoopgulati
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |