my $mask = inet_aton('255.255.255.0'); #### $ip = inet_aton($ip); # convert ascii to decimal