Question : perl script to find the netid given ip and subnet mask?

Is there a easy way to do that? suppose I have below information
and I would like to find the subnet id? or may be how many host
belong to the subnet id. Thanks!


IP Address: 209.3.2.1
Subnet Mask: 0xfffffe00

Answer : perl script to find the netid given ip and subnet mask?

1:
2:
3:
4:
5:
6:
#!/usr/bin/perl

use Net::Netmask;

$n=Net::Netmask->new("209.3.2.1","0xfffffe00"); 
printf("Broadcast: %s\nSize: %s\n", $n->broadcast(), $n->size());
Random Solutions  
 
programming4us programming4us