Write an expression or perl script to identify the entered
ip address is valid or not?
Answer Posted / subhash chandran
if($IP !~ /(((\d|[1-9]\d|1\d{2}|2[0-4]\d|25[0-5])\.){3}(\d|
[1-9]\d|1\d{2}|2[0-4]\d|25[0-5]))/)
{
print "Valid\n";
}
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain lexical variables.
Differentiate use and require?
what is perl language?
“The methods defined in the parent class will always override the methods defined in the base class”. What does this statement means?
What are the various advantages and disadvantages of perl?
What does undef function in perl?
Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.
What is the use of "stderr()"?
what is the function that is used to identify how many characters are there in a string?
What is the difference between perl array and perl hash?
What is the purpose of “_file_ literal” and “_line_ literal” in perl?
Which operator in perl is used for the concatenation of two strings?
Write a program to download the contents from www.perlinterview.com/answers.php website in Perl.
Write a program that explains the symbolic table clearly.
What are perl variables?