Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
Hi Paul, In article <[EMAIL PROTECTED]>, Paul Johnson wrote: > > Kevin Pfeiffer said: [...] >> But what I can't figure out (and have tried several variants) is how to >> get the count when using a variable (ala' from inside an eval). This is >> the closet I got: >> >> my $sentence = "Here is my

Re: Count Function?

2003-06-27 Thread Paul Johnson
Kevin Pfeiffer said: > Thanks to Sudarshan & Janek! > > I found this as suggested... > > # NOTE: (from perlop) > # Because the transliteration table is built at com­ > # pile time, neither the SEARCHLIST nor the REPLACE­ > # MENTLIST are subjected to double quote interpola­ > # tion. That means

Re: Count Function?

2003-06-27 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Sudarshan Raghavan wrote: > Nelson Ray wrote: > >>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

Re: Count Function?

2003-06-27 Thread Janek Schleicher
Nelson Ray wrote at Thu, 26 Jun 2003 19:25:37 -0700: > 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

Re: Count Function?

2003-06-27 Thread Sudarshan Raghavan
Nelson Ray wrote: 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 opera

Count Function?

2003-06-27 Thread Nelson Ray
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 look