in reply to Octet Regex

You should also use the 'qr' operator in this case for quoting your regexp (see perlop, and perlre).

my $octet = qr!(\d{1,3}\.){3}\d{1,3}!;