There are many other problems in the script as presented, but you immediate problem can probably be solved by changing the offending line to:
$arr[$i]=~ s/\Q$Name_pre\E/$Name/g;
In reply to Re^3: Substitution for braces
by GrandFather
in thread Substitution for braces
by gem555
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |