From c3b614b2a95ab4dcce2997e1c84d8c291cdffd14 Mon Sep 17 00:00:00 2001 From: WTMike24 Date: Tue, 16 Aug 2022 00:10:13 +0000 Subject: [PATCH] Used strict - apprently this is best practices --- perl/vping | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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/;