in reply to Representing a 32-bit integer

To validate that the string you are given actually contains an IP address, you chould/should:
use Regexp::Common qw /net/; if ($givenIP =~/^$RE{net}{IPv4}$/){ # got good IP. }

     "An undefined problem has an infinite number of solutions." - Robert A. Humphrey         "If you're not part of the solution, you're part of the precipitate." - Henry J. Tillman