Provide patterns for cidr blocks.
use Regexp::Common ();
use Regexp::Common::net::CIDR ();
while (<>) {
/$RE{net}{CIDR}{IPv4}/ and print "Contains a CIDR.\n";
}
Patterns for \s-1CIDR\s0 blocks. Now only next IPv4 formats are supported:
xxx.xxx/xx xxx.xxx.xxx/xx xxx.xxx.xxx.xxx/xx
With {-keep} stores address in $1 and number of bits in $2.
perl Makefile.PL make make install
As Regexp::Common doesn't work well with extensions named \*(C`Regexp::Common::xxx::yyy\*(C' you have to load this extension yourself with \*(C`use\*(C' or \*(C`require\*(C'.
Ruslan U. Zakirov <[email protected]>