Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have to substitute ” or ” with single quotes. Now the output I get from the above code is ' 3&' Where the expected output should be 3.#!/usr/bin/perl $line="” 3”"; $line =~ s/[&|&\;]rdquo;/'/g; print $line;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: quotes substitution
by citromatik (Curate) on Jun 29, 2009 at 06:23 UTC | |
by hnd (Scribe) on Jun 29, 2009 at 07:52 UTC | |
by citromatik (Curate) on Jun 29, 2009 at 08:00 UTC | |
by hnd (Scribe) on Jun 29, 2009 at 10:18 UTC | |
Re: quotes substitution
by wfsp (Abbot) on Jun 29, 2009 at 08:53 UTC | |
by afoken (Chancellor) on Jun 30, 2009 at 05:51 UTC | |
Re: quotes substitution
by hangon (Deacon) on Jun 29, 2009 at 07:16 UTC |
Back to
Seekers of Perl Wisdom