Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

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. ;)


Comment on Re: how to sort string in perl

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (14)
As of 2015-10-06 16:54 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (155 votes), past polls