For example, if $foo = 'aabbcc' then I need a variation of s/$foo/X/ that will transform $foo into 'aabXcc'.
Thanks in advance!
In reply to matching operator question by redss