I've always hated that idiom. It's so satanic.
#!/usr/bin/perl use strict; use warnings; my $COUNT = 0; while(<DATA>){ $COUNT++ while m{\b\w+\b}g; } die "COUNT $COUNT"; __END__ Hello there boss! How are you doing today. I really hope you don't slip on that banana peel. I count 22 words.
____________________________________________________
** The Third rule of perl club is a statement of fact: pod is sexy.
In reply to Re: Re: Counting words
by PodMaster
in thread Counting words
by raveguy2k
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |