One might wonder why you're using s/// to replace something with itself rather than just using nested while loops and a m// instead.
while( <> ) { while( /\b(\w+)\b/g ) { $w{$1}++; $t++; } }
Update: Duh, you're going for obfuscated not efficiency. Never mind me.
In reply to Re: Golf: Count unique words
by Fletch
in thread Golf: Count unique words
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |