Help for this page

Select Code to Download


  1. or download this
    print "Valid IP\n" if 4 == grep { /^\d+$/ and $_ < 256 } split /\./, $
    +ip;
    
  2. or download this
    my regex octet {(\d ** 1..3) <?{0 <= $0 <= 255 }> }
    my regex ip {^ <octet> ** 4 % '.' $}