in reply to find2perl with File::Find and -maxdepth

I'd go with something much simpler:     my @files= glob( "*/*/*/threads.html" ); with the knowledge that it might not work on some "fringe" operating systems. ;)

        - tye (but my friends call me "Tye")

Replies are listed 'Best First'.
Re: (tye)Re: find2perl with File::Find and -maxdepth
by u914 (Pilgrim) on Jun 02, 2002 at 15:41 UTC
    Hey thanks guys!

    tye, i think i'll have to go with sam's version, since there's potentially hundreds of thousands of such files, and i really only want to work on ones created in the last 60 days or so... and i'm pretty sure i can do that with the File::Find stuff.

    But, your 'simpler' solution is pretty elegant, given a *nix machine (which is indeed the case here).

    sam, i think you should post your work here in the 'snippets' section or something, it's a rather useful thing to be able to do (if you need to), and find2perl doesn't do it... i'm sure other newbies could benefit.

    Thanks again folks!

      BTW, this works on more than just Unix. And it is easy to skip files that don't fit in a date range:

      my @files= grep -C $_ <= 60, glob( "*/*/*/threads.html" );
      Though this loads the entire list of files before it is stripped down so it still might not work for you.

              - tye (but my friends call me "Tye")