in reply to Parsing IPv4 Addresses and distinguishing Masks

Ifyou will be manipulating IP addresses/masks, you should take advantage of a number of excellent modules that were designed by experts for that purpose.

I recommend Netaddr::IP. IF the "new" function returns a defined object, you have a valid IP address, that you can manipulate(and perform more rigorous tests with) .

     "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

  • Comment on Re: Parsing IPv4 Addresses and distinguishing Masks