Help for this page

Select Code to Download


  1. or download this
    use Socket;
    
    ...
    
      return inet_ntoa(pack('N', $next));
    }
    
  2. or download this
    sub prefix_to_mask {
      my ($bits) = @_;
    
      return inet_ntoa(pack('N', (2**32) - (2**(32-$bits))));
    }