in reply to Re: perldoc of s///ee wrong or just misleading? (read more)in thread perldoc of s///ee wrong or just misleading?
Consider
s/.../$1' $2"/ [download]
More accurate:
$string->substitute( qr/pattern/, sub { qq/replacement/ } ); [download]