title: Perl - How to decode or replace &#39; from database to single quote for browser display
body: <p>I have found lots of questions close to this but, nothing that helped me solve it. Prob due to my lack of expertise.</p>
  
  <p>PHP has  <code>html_entity_decode</code> which could have helped but, Perl does not, I believe.</p>
  
  <p>In my MySQL database I have <code>&amp;#39; &amp;#34;</code> following lengths in a description like: <code>12&amp;#39; 6&amp;#34;</code></p>
  
  <p>I would like it to display as 12' 6".</p>
  
  <p>I have tried:</p>
  
  <pre><code>$string =~ s/:[&amp;#39;]:/'/g;
  $string =~ s/:[&amp;#34;]:/"/g;
  $string =~ s/&amp;#39;/'/g;
  $string =~ s/&amp;#34;/"/g;
  $string =~ s/\&amp;#39;/'/g;
  $string =~ s/\&amp;#34;/"/g;
  $string =~ s/\&amp;#39;/\'/g;
  $string =~ s/\&amp;#34;/\"/g;
  perl -pi -e 's:&amp;#39;:':g' $_; #crashes.
  perl -pi -e 's:&amp;#34;:":g' $string #also crashes.
  system -pi -e 's:&amp;#39;:':g' $_; #crashes.
  system -pi -e 's:&amp;#34;:":g' $string #also crashes.
  </code></pre>
  
  <p>I am at a loss. Can someone help?</p>