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
There is no strict data types in perl unlike in other high level languages like Java so wouldn't that be a problem if a code in perl is to be a written by a big team of 20+ members ?"
What is use of ‘->’ symbol?
How to deleting an existing file in perl programming?
We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?
How do you find the length of an array?
Explain socket programming in perl?
What does redo statement do in perl?
Give an example of the -i and 0s option usage.
Explain subroutine?
What is q (single q) operator in perl?
What rules must be followed by modules in perl.
How to close a file in perl?
Give an example of using the -n and -p option.
How do you you check the return code of a command in perl?
how to extract pin_code,phone_number,year from text file using regular expressions in perl