s@$var@$somethingelse@I presume you want the replacement text to be the literal string '$somethingelse', rather than the contents of the variable. The replacement text in substitutions behave like double-quoted strings, which cause interpolation. To avoid this, either use single quotes, or escape the $, eg
s{$var}'$somethingelse'; s@$var@\$somethingelse@;
Dave.
In reply to Re: substituted text is being interpreted
by dave_the_m
in thread substituted text is being interpreted
by j.goor
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |