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


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:
fix_chars(@names);
instead of:
my @names = 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:
sub fix_chars { my @fixed = @_; for (@fixed) { tr/ΑΠΙΝΣΪέΦαπινσϊύφ/ADEIOUYOadeiouyo/; ... } return @fixed; }

-Blake