This code may work, but not reliably -- it depends on your background colour. For comparison,
in reply to Re: URGTENT: Need to remove undescore characters
in thread Replacing underscore characters with whitespace
will never work (on most browsers), as it will tend to generate pinkspace. Of course, Unicode probably has 4 different solutions for you (although 2 will not work for Japanese and the other 2 fail for Arabic). Perl supports Unicode, so you should have no problems in that regard.
I suspect, however, that this is an inherent problem; Perl cannot help you here.