use strict; use warnings; my $obj_ip = new NetAddr::IP '10.12.100.0','255.255.252.0'; print "Network: " . $obj_ip->network . "\n"; print "Bits: " . $obj_ip->bits . "\n"; print "CIDR: " .$obj_ip->cidr . "\n"; print "Addr: " . $obj_ip->addr . "\n"; print "Mask: " . $obj_ip->mask . "\n"; #### Network: 10.12.100.0/22 Bits: 32 CIDR: 10.12.100.0/22 Addr: 10.12.100.0 Mask: 255.255.252.0