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 / ramya

while ($string =~ /<pattern>/g) { $count++ }

Is This Answer Correct ?    9 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Suppose an array contains @arraycontent=(‘ab’, ‘cd’, ‘ef’, ‘gh’). How to print all the contents of the given array?

962


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

861


How to concatenate strings with perl?

857


Elaborate on perl bite-wise operators.

904


What is the difference between perl array and perl hash?

1072


How can you replace the characters from a string and save the number of replacements?

891


Comment on array slicing and range operator

938


what is the function of Return Value?

1057


How to connect with sqlserver from perl and how to display database table info?

948


How to deleting an existing file in perl programming?

901


Why does Perl not have overloaded functions?

1031


Write the program to process a list of numbers.

977


What is perl I used for?

948


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

888


What is perl? What is the basic command to print a string in perl?

868