in reply to attach a prefix to a filename

could be this?
perl -e '$\="\n";$tempvalue = "c:/reports/check/test.txt"; print $temp +value if $tempvalue =~ s/\/([^\/]+)$/\/design.$1/g'