in reply to Unexpected behavior with Net::Netmask

Give Net::CIDR::Lite a try. It's not quite as flexible in accepting input formats as Net::Netmask is, but it will take ranges that are not necessarily netblocks (and it should take the format you have in your example).
use Net::CIDR::Lite; my $b = Net::CIDR::Lite->new( '218.0.0.0 - 221.255.255.255' ); print "Match!\n" if $b->find('216.23.234.32');
Alternatively for the simple case you have (and requiring no extra modules as well as probably being the most efficient solution):
use Socket; my $ip1 = inet_aton('218.0.0.0'); my $ip2 = inet_aton('221.255.255.255'); my $ip3 = inet_aton('216.23.234.32'); print "Match!\n" if $ip1 <= $ip3 and $ip3 <= $ip2;