ait has asked for the wisdom of the Perl Monks concerning the following question:

Hello my fellow monkymen,

I'm looking for a module that can tell me if an IP is in a range. For example, I have a file with a bunch of IP ranges of spammers in the form:

I want to know if IP address X is in the range above. I looked at too many modules on the CPAN already and some seem to suck big time, so I am asking for advice on which would be the best module to use for this application IYO.


Alejandro Imass

Update 1:
Very decent ones seem to be Net::IP::Match by Marcel Grünauer and Net::IP::Match::Regexp by Chris Dolan but they don't really fit my purpose exactly because they seem to use CIDR only. I'm sure there has to be similar decent modules for ranges in the form above!

Update 2:
Paul Bennett's Net::IPAddress::Util and related modules seem very cool and probably fit my bill. Any other suggestions?