Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
use Tk;
use Net::Ping;
use Getopt::Long;
#handle/parse command line stuff...
my $mw = MainWindow->new();
#draw the interface...
&pingnow; #This part works. It successfully pings everything
#once when it starts up.
MainLoop;
sub newrange #Changes the number of nodes to ping
#newrange definition...
sub pingnow
{
@Bad = ();
$p = Net::Ping->new("$opt_p");
foreach $k(@Hosts)
{
if (!($p->ping($k)))
{
push(@Bad, $k);
}
}
$p->close();
$badlist->delete(0, 'end'); #clear the old list of bad nodes
$badlist->insert('end', @Bad); #dump in the new list
}