<?xml version="1.0" encoding="windows-1252"?>
<node id="764597" title="replace string" created="2009-05-18 04:18:23" updated="2009-05-18 04:18:23">
<type id="115">
perlquestion</type>
<author id="615928">
sandy1028</author>
<data>
<field name="doctext">
Hi,

I have to read the file and if I find the characters like 
&amp;ldquo,&amp;rdquo,&amp;rsquo I have to replace it with some characters.
&lt;code&gt;
$data =~ s/&amp;ldquo;/&amp;#8220;/g; # change the lines
$data =~ s/&amp;rdquo;/&amp;#8221;/gi;
$data =~ s/&amp;rsquo;/&amp;#8217;/gi;
&lt;/code&gt;

But this is not replaced in the file when it occurs. How to do this
</field>
</data>
</node>
