in reply to A better, more powerful fileglob?

A quick CPAN search suggests perhaps File::Wildcard might suit you, though its syntax is a bit strange. Personally, I'd probably just use File::Find::Rule.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Replies are listed 'Best First'.
Re^2: A better, more powerful fileglob?
by jdporter (Paladin) on Feb 15, 2007 at 19:24 UTC

    Thanks. I think I might go with File::Wildcard. Its syntax is a bit strange, but it's not entirely baroque.

    The problem with File::Find::Rule, for my purposes, is that I want to be able to specify the search rule entirely in one succinct string of text, such as a user might supply as a commandline argument. The power of File::Find::Rule is largely in its API, AFAICT.

    Update: I have integrated File::Wildcard into my program over here, and it works like a champ.

    A word spoken in Mind will reach its own level, in the objective world, by its own weight
      It shouldn't be terribly hard to implement that yourself using File::Find or File::Find::Rule, just a bit of parsing of the path string. Not much code and it will work exactly how you want.

                      - Ant
                      - Some of my best work - (1 2 3)

        Ah! As implemented in findrule, for example. :-)