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

while(my $line=<DATA>){ if($line =~ /<cc>([\s\S]+?)<\/cc>/){ #print $name_pre; my $name=$1; my $name_pre = $1; $name=~ s/&amp;amp;/&amp;/g; $name=~ s/&amp;/-/g; $name =~ s/-$//; $name_pre=~ s/\Q$name_pre\E/\Q$name\E/g; $name_pre =~ s/\\//g; } } __DATA__ fg-&amp;amp;&amp;+(and(we- <id>6VE4AGAfg-&amp;amp;&amp;+(and(we-</id><cc>fg-&amp;amp;sonia&amp;-n +d_&amp;amp;lio_(we-</cc>
These changes doesnot reflect on the file. The replace is not done for the files. Please tell me what is the solution