Help for this page

Select Code to Download


  1. or download this
    sub my_inet_aton {
      my ($string) = @_;
    ...
               (($ip & 0xFF00) >> 8)      . '.' .
                 ($ip & 0xFF) );
    }
    
  2. or download this
    my $ipstring   = '192.168.190.128';
    my $maskstring = '255.255.255.0';
    ...
    
    print "Subnet portion of ", $ipstring, "/", $maskstring,
          " is ", my_inet_ntoa($subnet), "\n";