![]() |
|
No such thing as a small change | |
PerlMonks |
Re: Net:Addrby Zed_Lopez (Chaplain) |
on Dec 07, 2004 at 02:38 UTC ( #412812=note: print w/replies, xml ) | Need Help?? |
I went to report the doc error, and found a major, easy-to-fix bug that's been ignored for two years. ipv4_chkip will pass any string of four or more integers between 0 and 255 connected by .'s. The deal-breaker here is the 'four or more' instead of 'exactly four.' So I can't recommend it. Perhaps try Regexp::Common instead.
produces
Note that you do need to anchor the start and end of the regexp with ^ and $, 'cause just /$RE{net}{IPv4}/ would match 312.45.32.4.
In Section
Seekers of Perl Wisdom
|
|