It results in "no" when I can ping the local IP via CMD (Windows). Ultimately I want to ping every 5 seconds and add a timeout of 2 seconds (if someone can show me how).#!/usr/bin/perl use warnings; use strict; use Net::Ping; my $target = "10.64.164.56"; my $p = Net::Ping->new(); if ($p->ping($target, 2)) { print "We can ping"; } else { print "no"; }
In reply to Short pinging script isn't working by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |