in reply to Re^4: search and replace regex return value
in thread search and replace regex return value

Sorry, I should have mentioned that I had tested it, and the AM's workaround does work, my $target = $CFG{target}; copies the value without the magic.