Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Sorting Vietnamese text

by pdenisowski (Acolyte)
on Dec 23, 2013 at 16:05 UTC ( #1068210=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Sorting Vietnamese text
in thread Sorting Vietnamese text

Thanks! That looks like it might be working correctly.

Now to ask a dumb question - how do I replace the hard-coded list here

say for sort { vcmp($a, $b) } ('ầm', 'm', 'ấm ch', 'm số');
with an array like this:


ỷ : (1) to be fat (said of a pig); (2) to depend on
ỳ : inertia, state of inactivity, stay out, inert, sluggish
ỳ ạch : to toil, labor with difficulty
ỷ eo : reproach someone with something
ỷ lại : to depend, rely on others
ỷ thế : count on ones power, ones position, ones influence
yu nhau : to love each other, be in love
yu qu : precious, valuable

read in from a text file using something like

open(IN,"test.txt");
@unsorted=<IN>;

Sorry, I know that's a dumb question, but I keep getting errors saying "Global symbol XYZ requires explicit package name ..." when I try to do this.

Thanks again!


Comment on Re^5: Sorting Vietnamese text

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (11)
As of 2014-10-24 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (132 votes), past polls