Hi Monks,
I am tring to find the duplicates words in a paragraph.
#!/usr/bin/perl -w $/=" "; while(<>) { while($_=~m/\b(\w+\b)(\s+\1)\b/xig) { print "dup words '$1' occurs at paragraph $.\n"; } }
After running this stuff,i unable to get the expected result.so,pls suggest me to get the correct result.
Code tags added by GrandFather
In reply to Finding duplicate words in a paragraph by perladdict
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |