Think about adding \& to the replacement part of a s///. As in sed, the & means the whole match.
Then one can do s/$search/*\&*/go in stead of s/($search)/*\1*/go and there needs to be no $1 variable set up. (I assume that using () always makes a $1 available, even if it is not being used.) -- Grtz, Ruud