in reply to Re: Listglob
in thread Listglob

Doesn't work if the pattern is foo*/*bar, since you are doing only one readdir. As others have said in this thread already, why reinvent the glob built-in?

-- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re: •Re: Re: Listglob
by tachyon (Chancellor) on Apr 17, 2002 at 19:30 UTC

    Don't shout, you're hurting my eyes. As for why. Why not? Do you always drive just because it's faster? Would you not climb Everest because other have before you? Do you refuse to breath because others have been there, done that? Give the don't reinvent the wheel bit a break.

    cheers

    tachyon

      While climbing Everest is certainly interesting in a hard core life experience sort of way, it's rarely good advice on the best way to get from point a to point b.

      (For the record, I appreciate both your post and merlyn's reply. It's interesting to see how it can be done, but seekers of wisdom need to understand how dangerous a path it can be.)

      ()-()
       \"/
        `                                                   ` 
      
      Give the don't reinvent the wheel bit a break.
      I would, if you would make clear that you're inventing an inferior wheel than what is already readily available.

      I know I've made that point here before.

      I don't mind people experimenting in the privacy of their own cube. Or even post it here as a request for comment and feedback.

      But when they post it here as a solution, without disclosing that it is inferior to an existing solution, I believe it is necessary for it to be properly annotated as such by those who know. It's not personal: it's to prevent harm coming to others who cannot distinguish the real thing from a failed imitation.

      -- Randal L. Schwartz, Perl hacker