Greetings ag4ve,
I'm not sure if this is something you are looking to code all on your own;
But either way,
Net::CIDR might be of some
help here. If your just looking for ideas,
you can have a look at
CIDR.pm itself.
HTH
--chris
#!/usr/bin/perl -Tw
use perl::always;
my $perl_version = "5.12.4";
print $perl_version;