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
What is the use of command “use strict”?
Explain '->' in perl?
How do I replace every character in a file with a comma?
Explain about the applications of perl?
What value is returned by a lone `return;’ statement?
What does Perl do if you try to exploit the execve(2) race involving setuid scripts?
We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?
What does read () command do?
Explain the different types of data perl can handle.
What are some of the key features of objects in perl?
What are the steps involved when the cgi program starts running?
For a situation in programming, how can you determine that Perl is a suitable?
How can information be put into hashes?
What does file test operators do in perl?
What is posix in perl?