Help for this page

Select Code to Download


  1. or download this
    # take IP4 address string
    my $IP_str = '192.0.2.4';
    ...
    
    # output the result
    die  "($R)";
    
  2. or download this
    sub ipv4_6to4{
      return sprintf("2002:%s%s:%s%s::/48", map {sprintf("%02x",$_)} split
    +(/\./,$_[0]));
    }