in reply to Re: Foreign language characters...
in thread Foreign language characters...
The replacements are good, but the interface is a bit murky. It returns the "fixed" list, but it also modifies the original list. For instance, the output of your snippet is the same if you simply:
instead of:fix_chars(@names);
I would rewrite it so that it either left the original list intact, or didn't return the "fixed" list. Something like:my @names = fix_chars(@names);
sub fix_chars { my @fixed = @_; for (@fixed) { tr/ΑΠΙΝΣΪέΦαπινσϊύφ/ADEIOUYOadeiouyo/; ... } return @fixed; }
-Blake
In Section
Seekers of Perl Wisdom