Write an expression or perl script to identify the entered
ip address is valid or not?
Answer Posted / digesh patel
if($ipaddress=~m\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b)
print "\n It is a valid IP address :";
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the purpose of goto expr statement?
In Perl, what is grep function used for?
How to read a single line from a file in perl?
What is 'rollback' command in perl?
How to know whether a key exists or not in perl?
How to read multi lines from a file in perl?
How do I replace every TAB character in a file with a comma?
What are the various file operations in perl. Explain with example.
How do you match one letter in the current locale?
What are some of the key features of objects in perl?
You want to read command-line arguements with perl. How would you do that?
What is 'commit' command in perl?
Which has highest precedence in between list and terms? Explain?
What are the options that can be used to avoid logic errors in perl?
How can memory be managed in Perl?