Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: how to sort string in perl

by davido (Archbishop)
on Dec 05, 2012 at 16:48 UTC ( #1007331=note: print w/ replies, xml ) Need Help??


in reply to how to sort string in perl

You're in luck. If someone were asking me to sort strings, sort would be my second choice too. My first choice would probably be Unicode::Collate. Wrap your solution around that module, and you've satisfied the requirement of not using sort, while at the same time providing a better solution that sort would have offered in the first place.

I'm aware that this answer probably is of little help to you in your interview; the interviewer probably wants to see you write a sort. But if he's interested in getting the job done well, maybe he will respect the answer. ;)


Dave


Comment on Re: how to sort string in perl

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (6)
As of 2014-09-23 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (210 votes), past polls