Hi try this
my $string = "Hello World!\n Oh poor Yorick, his world I knew well ye +s I did"; ($err) = $string =~ s#(\w+)#$1#g; print $err;
Update: Using undef $/, you read all the text in one scalar and only word you replace by word and store in the variable. You may get the total count of the word of the document.
Regards,
s,,aaagzas3uzttazs444ss12b3a222aaaamkyae,s,,y,azst1-4mky,,d&&printIn reply to Re: Word incidence count
by gube
in thread Word incidence count
by redhotpenguin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |