note
citromatik
<p>
It is not clear for me what you want to accomplish, but generally use [cpan://HTML::Entities] to process html entities:
</p>
<c>
use strict;
use warnings;
use HTML::Entities;
my $line="&rdquo; 3&amp;rdquo;";
decode_entities ($line);
</c>
<p>If this module is of no help, please, try to give a step backwards and explain the kind of conversions you want to be done</p>
<p><b>Update</b>: A closer look at your code reveals that you are not using alternation correctly: <c>[]</c> in a regexp is a character class, but probably you are wanting <c>()</c> instead (see [perldoc://perlretut] and [perldoc://perlre]):</p>
<c>
$line="&rdquo; 3 &amp;rdquo;";
$line =~ s/(?:&|&amp\;)rdquo;/'/g;
print "$line\n";
</c>
<p>That prints:</p>
<c>
' 3 '
</c>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-615480">
<p><i>citromatik</i></p>
</div></div>
775558
775558