Help for this page

Select Code to Download


  1. or download this
    12.34.56.78/16|City A
    90.12.34.56/19|City B
    etc
    
  2. or download this
    # Build an array.  Each element of the array is a reference
    # to a two-element array consisting of a Net::Netmask object
    ...
        my ($block, $city) = split /\|/;
        push @blocks, [Net::Netmask->new($block), $city];
    }
    
  3. or download this
    sub find_city
    {
    ...
            }
        }
    }
    
  4. or download this
    $blocks{10}{0} = [
       [Net::Netmask->new("10.0.0.0/24"), "City A"],
    ...
       [Net::Netmask->new("10.1.0.0/24"), "City C"],
       [Net::Netmask->new("10.1.1.0/24"), "City D"]
    ];