diff --git a/perl/vping b/perl/vping index 7bd2fbb..a5544d0 100755 --- a/perl/vping +++ b/perl/vping @@ -1,5 +1,7 @@ #!/usr/bin/perl +use strict; + use Term::ANSIColor; if ($ARGV[0] !~ /[a-z0-9\.]+/) { @@ -7,7 +9,11 @@ if ($ARGV[0] !~ /[a-z0-9\.]+/) { exit 1; } -$dns=$ARGV[0]; +my $dns=$ARGV[0]; +my $regex; +my $dedjex; +my $pingcmd; + if ($^O == "linux") { $regex=qr/(?[0-9]+ bytes) from (?[a-z\.-]+) \((?[0-9\.]+)\).*seq=(?[0-9]+).*time=(?[0-9\.]+) ms/;