in reply to Reg Ex to find IP address in range
First of, I assume your IP address is actually valid and in the format you mention in your post.
Now for your problem: why make life hard? The code below is quite simple:
my @bytes = split(/\./, $ip); if ($bytes[2] <= 55 && $bytes[3] <= 55) { # ok }
You may -- or even should -- want to look at Net::IP, especially at the bincomp function.
Hope this helps, -gjb-
|
|---|