Used strict - apprently this is best practices

This commit is contained in:
Some guy named Michael 2022-08-16 00:10:13 +00:00
parent f95c07c0a4
commit c3b614b2a9

View File

@ -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/(?<bytes>[0-9]+ bytes) from (?<rhost>[a-z\.-]+) \((?<rip>[0-9\.]+)\).*seq=(?<rseq>[0-9]+).*time=(?<rms>[0-9\.]+) ms/;