Is there any module or way to find out netmask for a particular ip/host in perl same as like following ?

use Socket;
$packed_ip = gethostbyname("www.perl.org");
if (defined $packed_ip) {
$ip_address = inet_ntoa($packed_ip);
}