in reply to Spanish special characters

I'm just guessing here, but might it be that your text editor and your Perl interpreter disagree on character sets? I've never seen a literal high-bit character (such as ñ) in source code before, which may be coincidence or may not. For a test, why not try replacing the right hand side of each substitution with the escape sequence for the relevant character? That is, change your last substitution to

s/ñ/\xf1/;
and so on.

Better yet, though, don't write your own code to do it, use HTML::Entities to decode each string, thus:

#!/usr/bin/perl -w use strict; # you were using strict, weren't you? ;-) use HTML::Entities 'decode'; # snip (your MAIL statements here) for (@L) { print MAIL decode $_; }
Isn't that simpler? :-)

While I'm in "use CPAN" mode, I suggest you look at HTML::Parser for the tag-removing regex--parsing HTML (even just taking out tags) with regular expressions is a dangerous idea.

Good luck!



If God had meant us to fly, he would *never* have give us the railroads.
    --Michael Flanders