I like your idea but, I think you will overcount when there are leading
and trailing spaces and undercount when there are only commas,
semicolons etc.
How about
$text =~ s/^\W+|\W+$//g;
$number = $text =~ m/(\W+)/sg + 1;
Chris Wagner wrote:
What the hell, I'll give my version too. ;)
$number = $text =~ m/(\s+)/sg + 1;
Where $text is the entire document or whatever. Instead of counting ur
fingers, u can count the spaces between ur fingers and add one.
--
REMEMBER THE WORLD TRADE CENTER ---=< WTC 911 >=--
"...ne cede malis"
00000100
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs