in reply to substituted text is being interpreted

Hi,

what dragonchild said is correct... What variable are you substituting on?

if Metacharacter found inside the variable use 'quotemeta' or '\Q' and '\E'

$line='Sampel Text <a href="somefilename(x)withanumberedhash.htm#666"> +'; $somethingelse='ok'; $var = '<a href="somefilename(x)withanumberedhash.htm#666">'; $var=quotemeta($var); $line=~s@$var@$somethingelse@;
or
$line=~s@\Q$var\E@$somethingelse@;