http://www.perlmonks.org?node_id=1219339


in reply to Re^2: substituting 1 escaped character for another
in thread substituting 1 escaped character for another

I'm guessing a bit here, but when you say "The application executes in the WWW environment", I'm guessing that you are trying to modify an HTML page? Show us a segment of the HTML page and your code to decode and encode text -> HTML. Your regex will work fine on regular text, but I suspect that is not what you actually have.

In recent memory, I did a quickie kludge to handle the ampersand character in one "get it done right now" LWP application, $clubName =~ s/&/&/g; &amp is what HTML needs to display the ASCII & character. I suspect something similar is going on. We need more info...