in reply to Character class question

Welcome to the site.

You're probably missing a backslash in front of the W. \W signifies the character class containing non-word characters -- everything but a-zA-z0-9 and the underscore, though.

(As for posting suggestions, a better title would describe the problem you're having, not your status as a user. Including the version of Perl and the book and exercise you're using was wise, though.)