Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: I don't want to search subfolders

by YuckFoo (Abbot)
on Jun 15, 2005 at 22:36 UTC ( #467099=note: print w/ replies, xml ) Need Help??


in reply to I don't want to search subfolders

File::Find::Rule has a maxdepth method to limit how far down the tree to look.

YuckFind

#!/usr/bin/perl use strict; use File::Find::Rule; use Data::Dumper; my @dirs = ( 'L:\\renws\\billing\\uploadh', ); my @files = File::Find::Rule ->file() ->maxdepth(1) ->name(qr/.RP1/) ->in(@dirs); print Dumper \@files;


Comment on Re: I don't want to search subfolders
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2015-07-07 02:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (86 votes), past polls