Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: File::Find::prune problems

by grinder (Bishop)
on Mar 28, 2008 at 12:50 UTC ( [id://676965]=note: print w/replies, xml ) Need Help??


in reply to File::Find::prune problems

If you're starting out with File::Find, then the best advice I can give you is... don't. It is old and bletcherous and there's no need to use it for new work.

Much nicer is File::Find::Rule, which will cut off the depth search in a much more declarative manner, letting you get on with your job and not having to write so much make-work code to tweak File::Find to do your bidding.

my @files = File::Find::Rule->new ->maxdepth(2) ->file() ->in('/path/to/stuff');

• another intruder with the mooring in the heart of the Perl

Replies are listed 'Best First'.
Re^2: File::Find::prune problems
by spx2 (Deacon) on Mar 28, 2008 at 13:18 UTC
    I've found File::Find::Rule also nice but the moment I started realising File::Find is obsolete
    I was already too far on the way to finishing what I had started.
    but I agree File::Find::Rule is very nice(it's actually a generalisation of what I'm doing).

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://676965]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 23:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found