Simple and obvious answer

"For every problem there is always a solution that is simple, obvious, and wrong."


-- not Mark Twain
my $search = 'foo(.*?)bar';
my $replace = 'wibble$1wobble';

s/$search/qq!"$replace"!/eeg;
die $@ if $@;

next