Regexp::Common::net::CIDR -- 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 CIDR 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 Regexp::Common::xxx::yyy you have to load this extension yourself with use or require.
Regexp::Common::xxx::yyy
use
require
Ruslan U. Zakirov <ruz@bestpractical.com>
To install Regexp::Common::net::CIDR, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Regexp::Common::net::CIDR
CPAN shell
perl -MCPAN -e shell install Regexp::Common::net::CIDR
For more information on module installation, please visit the detailed CPAN module installation guide.