in reply to Patternmatching IPaddresses

Another very useful CPAN package to get to know is Regexp::Common, which is a kitchen sink collection of “canned,” known good regular-expression patterns, including ones for IP-addresses of all kinds.   Especially useful when you need to validate the contents of a file, or to “future proof” your logic.

(To fully see what I mean, click on that page, then click on the link to the right of the author’s name in the gray-shadowed line above “Module Version.”   This shows you all of the packages that are part of this one.   Then, if you search for the stringRegexp::Common,” you’ll see about 150 more equally-large ones.