$strvar = "test text"; $pattern = "\$strvar =~ s/(text)/\\[tag]$1\[/tag]/ig"; eval $pattern; [download]
In reply to Eval Function Question by brwarn