in reply to Re^2: Substitution for braces
in thread Substitution for braces

Take a look at perlre for more info and the opportunity to learn, but basically you'll either have to escape them using backslashes or use \Q \E to contain your $Name_pre string, though as pointed out above, why are you assigning the value in such an odd way?

you could substitute all ( in a string with the regex $string =~ s/\(/$cheesesauce/g;

Oh Goddess, look this code needs a lot of work, take a look at the following

open($FH,'<','file.txt'); $arr[$i]=join('',(<$FH>)); close ($FH); $arr[i] =~ /<cc>([\s\S]+?)<\/cc>/$1/; $arr[i] =~ s/&amp;amp;/-/g; $arr[i] =~ s/&amp;/-/g; $arr[i] =~ s/\(/-/g; # I assume $arr[i] =~ s/-$//; if (substr($arr[i],-1,1) eq '-') { $arr[i]=~ s/-$//g; # I assume you meant, though you've already done + it above }
I'm sure it's far from perfect, but an improvement on your current code nonetheless