in reply to case preservation in regexp
This will probably do what you are asking for:
$text =~ s[\b([Cc]at)\b][<span class="topic">$1</a>]g; [download]
but you also probably want </span> rather than </a> as requested :)