[Mimedefang] Stupid question? - subnet

David F. Skoll dfs at roaringpenguin.com
Mon Feb 10 16:33:01 EST 2003


On Mon, 10 Feb 2003, Jim McCullars wrote:

>    It's a string comparison, so you may be looking at a fairly complicated
> regex to do the test you want (I say "may be" because I don't know how to
> decode a CIDR address string to a range of addresses).

You might want to look at a Perl module to do CIDR comparisons; I think
Net::CIDR::Lite might be just the ticket:

http://search.cpan.org/author/DOUGW/Net-CIDR-Lite-0.14/Lite.pm

Or perhaps NetAddr::IP is more to your liking:

http://search.cpan.org/author/LUISMUNOZ/NetAddr-IP-3.14/IP.pm

Or Net::CIDR:

http://search.cpan.org/author/MRSAM/Net-CIDR-0.04/CIDR.pm

What was that horrible Perl slogan again?  "TIMTOWTDI"?

--
David.



More information about the MIMEDefang mailing list