- or download this
12.34.56.78/16|City A
90.12.34.56/19|City B
etc
- 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];
}
- or download this
sub find_city
{
...
}
}
}
- 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"]
];