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
In reply to Re: Parsing IPv4 Addresses and distinguishing Masks
by NetWallah
in thread Parsing IPv4 Addresses and distinguishing Masks
by ewhitt
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |