Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the purpose of goto expr statement?

860


In Perl, what is grep function used for?

1033


How to read a single line from a file in perl?

937


What is 'rollback' command in perl?

921


How to know whether a key exists or not in perl?

942


How to read multi lines from a file in perl?

886


How do I replace every TAB character in a file with a comma?

940


What are the various file operations in perl. Explain with example.

903


How do you match one letter in the current locale?

977


What are some of the key features of objects in perl?

902


You want to read command-line arguements with perl. How would you do that?

870


What is 'commit' command in perl?

1059


Which has highest precedence in between list and terms? Explain?

838


What are the options that can be used to avoid logic errors in perl?

917


How can memory be managed in Perl?

994