http://qs1969.pair.com?node_id=287429

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

Hi,

I am trying to determine if a clients IP address is within a certain range. The first two node are fixed so that's not a problem - the last two can be anywhere between 0 and 55 each ie xxx.xxx.0.55 - good xxx.xxx.56.56 - bad

I initially tried
/^111\.255\.(([0-5])|([0-5]{2}))\.(([0-5])|([0-5]{2}))$/
but it didn't take me long to figure out that xxx.xxx.48.55 would fail DOH!

It's been a long hard day, if anyone has a quick answer to end my frustration that would be most welcome