Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re2: Foreign language characters...

by blakem (Monsignor)
on Oct 09, 2002 at 04:27 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://203828]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-19 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found