On 09/05/2006 03:47 AM, Andrew Kennard wrote:
Hi all
I'm looking for a good word counting module/sub routine
I've found this so far
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=562&lngWId=6
but it counts things like the "Item1,Item2,Item3" as one word
I've had a search on CPAN but that did not result in any at all ? did I miss
something ?
I need a word counter to count the number of words in a scientific paper. I
know it wont be 100% accurate due to formulas etc but has anyone got a
better solution than the one above ? It's to check it is under a max word
count
Thanks in advance
Andrew
This is untested ($data should contain the text with the words):
my $count = () = $data =~ m/[[:alpha:]]+/g;
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>