s/^(.*?)test(.*)$/"#$1"."test$2"/e [download]
In reply to Re^2: find & replace a string in perl by iefbr14 in thread find & replace a string in perl by vr786