in reply to regex help

Make sure the code you are running throught he regex is not interpolated.
perl -e 'print qq|$_\n| for q|tttt $x=123 ttt @c=qw/1 2 3/; tt $xxx tt +ttt @something|=~/([\$\@\%]\w+)/g' $x @c $xxx @something
Update:This code is simplistic. JavaFan's regex (++), above, is much more rigorous.

             All great truths begin as blasphemies.
                   ― George Bernard Shaw, writer, Nobel laureate (1856-1950)