All pastes #813826 Raw Edit

Something

public text v1 · immutable
·published 2007-12-12 20:53 UTC
rendered paste body
use strict;
use warnings;
use DBI;
use Net::Ping;

my $i = {
    'cfg'   => "./servers.cfg"
};
## SLAVE:IP:VPNIP:GLPORT:SSHPORT
open (CFG, "<", "$i->{cfg}");
my $slave = <CFG>;





for $slave (<CFG>) {
    my ($name, $wanip, $vpnip, $glport) = $slave =~ /^(\S+)\:(\S+)\:(\S+)\:(\S+)/;
    my $pingstatus = getping($wanip);
}

sub getping {
  print $_;
}