develooper Front page | perl.beginners | Postings from June 2003

Count Function?

Thread Next
From:
Nelson Ray
Date:
June 27, 2003 01:19
Subject:
Count Function?
Message ID:
20030627022518.43724.qmail@onion.perl.org
Does anyone know of any sort of a function or method in perl that returns
the number of times a search string exists in a scalar.  Say, how many "a's"
are there in this sentence?  I am able to write it myself, but I was
wondering if Perl had an inherent function for cleaner operation.  I tried
looking through the list of functions at www.perldoc.com without success.
Thanks a lot for any help.



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About