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
If you want to empty an array then how would you do that?
Explain goto label?
What is a perl references?
Who created perl?
What does redo statement do in perl?
I have one question regarding to eval function. I know eval function is use for error checking but I am not able to understand below line. eval \'exec perl -S $0 ${1+\"$@\"}\' if 0; $0 for script name $@ set if error occur
how to get back up from private character editor which is saved in the format of .udf
What happens when you return a reference to a private variable?
Explain the default scope of variables in perl?
How to convert strings into an array in perl?
Explain the difference between "my" and "local" variable scope declarations. ?
What are the two ways to get private values inside a subroutine?
What is the use of -n and -p options?
What is the peculiarity of returning values by subroutines in perl?
Can you add two arrays together?