hi i am new to perl and was trying to write a script to check if ip address is valid.
The digit groups of an IPv4 address have to be octets, i.e. numbers between 0 and 255 in decimal notation. Your regex would validate an address such as 258.344.543.877, whereas none of the digit groups fits the...
2nd regex is difficult to understand but won’t accept incorrectly typed IP’s as 10.010.05.2 and accepts only in 10.10.5.2 format. The script also shows the use of perl’s inbuilt module Data:Validate:IP for IP address validation.
permanentE has asked for the wisdom of the Perl Monks concerning the following question: I'm trying to write a function that tells you if an IP address is in a classless subnet. First of all, has any one already written this code? If not, I'm having trouble with the regex's.