- or download this
my $address = 'ip=111.112.113.114 ';
my ($ip) = $address =~ /ip=(([0-1]?[0-9]{1,2}\.)|(2[0-4][0-9]\.)|(25[0
+-5]\.)){3}(([0-1]?[0-9]{1,2})|(2[0-4][0-9])|(25[0-5]))\s/;
print $ip;
- or download this
my $tuple = qr'[0-1]?[0-9]{1,2}|2[0-4][0-9]|25[0-5]';
my $address = 'ip=111.112.113.114 ';
my ($ip) = $address =~ /ip=(($tuple\.){3}$tuple)\s/;
print $ip;
- or download this
#!/usr/bin/perl
...
print "The total amount of domains that we don't care about is ". scal
+ar @bad_domains."\n";