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 are the advantages and disadvantages of perl language?
Which has highest precedence in between list and terms? Explain?
How to connect with sqlserver from perl and how to display database table info?
What are the advantages of c over Perl?
What are stdin, stdout and stderr?
Explain perl.
Explain the difference between die and exit in perl?
Is perl a case sensitive language?
How does polymorphism work in perl?
What value is returned by a lone `return;’ statement?
How to open and read data files with Perl
How can you define “my” variables scope in Perl and how it is different from “local” variable scope?
What is goto statement in perl?
What are the various flags/arguments that can be used while executing a perl program?
How to turn on Perl warnings? Why is that important?