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...

How to count no of occurrence of a unique patterns in perl?

Answer Posted / shah faisal

($count)=$string =~ s/<pattern>/<pattern>/g;

Is This Answer Correct ?    4 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does Perl do if you try to exploit the execve(2) race involving setuid scripts?

886


Which statement has an initialization, condition check and increment expressions in its body? Write a syntax to use that statement.

971


Explain the meaning of closure in perl.

950


What is the usage of -i and 0s options?

918


What does last statement do in perl?

941


In Perl, there are some arguments that are used frequently. What are that arguments and what do they mean?

856


Explain join function in perl?

880


In CPAN module, name an instance you use.

905


Explain the various characteristics of perl.

895


What does this symbol mean '->'?

916


What $! In perl?

900


what is Perl one liner?

857


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

815


Why do we use "use strict" in perl?

912


Mention the difference between die and exit in Perl?

1037