I was going to do something clever like post the smallest valid IP address that illustrates the problem, but I decided that I'd rather point out a few well-known sites that have "invalid" IPs :-)
thinkgeek 66.35.250.160
perl.com 208.201.239.56
google 64.233.161.104
theonion 66.216.104.235
I was really hoping that perlmonks.com itself would be "invalid", but alas it is not so.
Oh, I noticed some golfing for the smallest fix. I can't come up with anything smaller than 2 characters. Unless of course, you count removing the entire sub and replacing it with Regexp::Common or something. The absolute character count would be smaller then I think :)