$ perl -e'$with=q(print "baz");$_="foobar";s/(foo)(bar)/qq(qq($with))/ee;print' print "baz"$