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 difference between perl array and perl hash?
What is perl push array function?
How do you find the length of an array?
What is a chomp() function in perl?
When do you use perl programming?
How do I send e-mail from a Perl/CGI program on a Unix system?
What is the use of now constructor in perl?
What are the arguments and what do they mean in perl programming?
What is the difference between localtime() and gmtime() functions?
How to copy a file in perl?
How are parameters passed to subroutines in perl?
What is the difference between use and require in perl programming?
Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.
What is the difference between die and exit in perl?
Which functions in Perl allows you to include a module file or a module and what is the difference between them?