in reply to Word Evaluation

first, try reformating your questions next time.
Secondly, I didn't quite undestand your question what's in $w. '=~' is used for regexp, and unless $w is a pattern, it's a mistake, please give a little more details.

Hotshot