http://qs321.pair.com?node_id=374793


in reply to Re: Sorting - lower to upper
in thread Sorting - lower to upper

That'll make duplicate copies of everything that doesn't begin with a letter. Maybe you want to narrow those regexen down a bit.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


update: Oops, confused [^a-z] with ^[a-z]. So yes, everything without a letter will be absent, not duplicated. Doesn't change that there's something wrong with this solution.

Replies are listed 'Best First'.
Re^3: Sorting - lower to upper
by Roy Johnson (Monsignor) on Jul 15, 2004 at 20:29 UTC
    Seems to me that it should leave out anything that doesn't begin with a letter. Given the specs, that may or may not be desirable.

    We're not really tightening our belts, it just feels that way because we're getting fatter.
Re^3: Sorting - lower to upper
by perldeveloper (Scribe) on Jul 15, 2004 at 20:37 UTC
    It seems to me that rather than duplicate all non-first-lettered-words (nice hyphenate don't you think?), it actually discards all these words. I mean, the first list sorts all words which start with a small-case and the second list sorts all the first-upper-cased-words.

    I would appreciate explanation.

    Update: It seems that my pertinent and correct remark was voted down at least two times. I wonder what that means.
      It seems that my pertinent and correct remark was voted down at least two times. I wonder what that means.
      It doesn't necessarily mean anything, apart from the fact that there are some jackasses around. Downvotes are the most contentious and least useful feature of PerlMonks.

      We're not really tightening our belts, it just feels that way because we're getting fatter.