Looks like you checking for the frequency of words in a file. In that case, the 2 \b in your regex aren't really necessary.
s/(\w+)/$w{$1}++;$t++;$1;/eg while (<>);
In reply to Re: Golf: Count unique words
by pearl
in thread Golf: Count unique words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |