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 are the two ways to get private values inside a subroutine?

899


What are prefix dereferencer? List them.

974


Mention how many ways you can express string in Perl?

1014


What are numeric operators in perl?

951


What is q (single q) operator in perl?

1093


What is the use of -n and -p options?

1044


How to code in perl to implement the tail function in unix?

933


Write syntax to use grep function?

968


We all know private variables exist in perl. But do private METHODS exist in perl ? Eg ?

2476


Explain USE and REQUIREMENT statements?

930


How would you ensure the re-use and maximum readability of your perl code?

938


How do I generate a list of all .html files in a directory?

953


Define operators used in perl?

940


Explain cpan?

974


Differentiate use and require?

943