The question itself

How can I make this DWIM?

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

s/$search/$replace/g;

next