in reply to RegEx Problem

Hi guys, new to the boards, and yes this is my first post. LP try this. I have tested it and should work for you as well.
$word=<STDIN>; chomp ($word); $word=~s/[A-Z]/-$&/g; #converts A to -A $word=~tr [A-Z][a-z]; #converts -A to -a print $word