sandy1028 has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have to read the file and if I find the characters like
&ldquo,&rdquo,&rsquo I have to replace it with some characters.
But this is not replaced in the file when it occurs. How to do this$data =~ s/“/“/g; # change the lines $data =~ s/”/”/gi; $data =~ s/’/’/gi;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: replace string
by CountZero (Bishop) on May 18, 2009 at 08:26 UTC | |
Re: replace string
by moritz (Cardinal) on May 18, 2009 at 08:27 UTC | |
Re: replace string
by Utilitarian (Vicar) on May 18, 2009 at 08:30 UTC | |
by sandy1028 (Sexton) on May 18, 2009 at 09:21 UTC | |
by Anonymous Monk on May 18, 2009 at 09:24 UTC | |
by sandy1028 (Sexton) on May 18, 2009 at 10:30 UTC | |
by ig (Vicar) on May 18, 2009 at 10:43 UTC | |
by Anonymous Monk on May 18, 2009 at 10:42 UTC | |
by Errto (Vicar) on Jun 02, 2009 at 18:16 UTC | |
by sandy1028 (Sexton) on May 18, 2009 at 09:32 UTC | |
by ig (Vicar) on May 18, 2009 at 10:37 UTC | |
by Anonymous Monk on May 18, 2009 at 09:36 UTC | |
Re: replace string
by Anonymous Monk on May 18, 2009 at 08:21 UTC |
Back to
Seekers of Perl Wisdom