Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

(tye)Re: IPv4 regex (Net::IPv4Addr)

by tye (Sage)
on Feb 19, 2001 at 01:00 UTC ( [id://59282]=note: print w/replies, xml ) Need Help??


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")

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://59282]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (2)
As of 2024-04-19 20:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found