in reply to Match a Range of IP's

IMHO, the right way to do this is to convert all the IPs to integers and compare those. Comparing with a RE will work for most common ones, but trying to determine if is betwen and is not well suited for a regular expression.
if((ip2int($iplow)<=ip2int($ip))\ &&(ip2int($ip) <=ip2int($iphigh))){ #... } sub ip2int{ my $ip=shift; my @s=split /\./,$ip return $s[3]+($s[2]+($s[1]+$s[0]*256)*256)*256; }