このパッケージはCPANからインストールできます。
perl -MCPAN -eシェル
Netのインストール:: Patricia
インストール後、このパッケージを次のように使用できます。
#!/usr/bin/perl -w
use Net::Patricia;
# IP tools
my $pt = new Net::Patricia;
$pt->add_string('212.44.12.0/24');
if(defined($pt->match_string('212.44.12.3'))){
print "IN\n";
}else{
print "OUT\n";
}