Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re2: Foreign language characters...

by blakem (Monsignor)
on Oct 09, 2002 at 04:27 UTC ( #203828=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://203828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2019-08-23 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?