in reply to
Playing with extended chars
You might also want to look at Text::Iconv.
My recommendation is to use perl 5.8.0 or more recent and look at perldoc Encode, perldoc open, and perldoc -f open. If tr doesn't work because you have the characters encoded in two bytes, you can do
$s = decode_utf8($s);
That will convert the string into the internal representation where characters are characters and you don't have to worry about how many bytes they need for encoding.
The first attemp works like this:
perl -e '$_="áéíóú";tr/áéíóú/aeiou/;print'
BTW, encode and decode functions return values that make me think that the string is well formed, and that is tr// who's making wrong things. Am I too lost?
$s = 'holÃ¡Ã©ÃÃ³Ãºon';
$s =~ tr/Ã¡Ã©ÃÃ³Ãº/aeiou/;
# prints holaeiouon
shiny regexes and rules offered by Perl 6
other CPAN module
by looking at it on my monitor
I print it and I read it in spare time
first I convert it into $FORMAT, then I parse it
I hire someone to do it
using my custom module
I write a brand new language to do the task
on the server where I play as human, XML is forbidden
what is XML?
I speak XML natively
I write a new grammar for Perl 6
some other way
Results (443 votes),