in reply to Re: IPv4 regex (Net::IPv4Addr)
in thread IPv4 regex

Heh. I just wanted to note that the test for $_ < 0 is a waste since nothing matching \d+ can be negative.

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re (tilly) 2: IPv4 regex (Net::IPv4Addr)
by tilly (Archbishop) on Feb 19, 2001 at 03:35 UTC
    perl -e 'use integer; print 3000000000 + 1'

      The code in question didn't use integer, and "3000000000 + 1" doesn't match \d+, but other than that, uh, yeah, I suppose you'd want to defend against such values in your IP addresses. (:

              - tye (but my friends call me "Tye")