http://www.perlmonks.org?node_id=1003657


in reply to Re: ordering array of sentences
in thread ordering array of sentences

Be aware there are two potential issues here, which are contained in the sentence I'm searching. First, \w+ will not match on the apostrophe, so you'll end up sorting on m instead of I'm. If you fix that, you'll still get an incorrect result because cmp is case sensitive.

#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.