Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

File::Find::Rule

by barbie (Deacon)
on May 26, 2003 at 09:23 UTC ( #260807=note: print w/replies, xml ) Need Help??


in reply to visit directories and more...

Can I suggest you have a look at File::Find::Rule. It makes picking up the exact files you want from your start directory, a lot easier. It returns an array of found files with the full path, so you can pass that straight to open and get the contents of only the files you want. It can get rid of several lines of checking for . .. and any other system type files.

Excluding core modules, it's my most used module.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Barbie
Birmingham Perl Mongers
Web Site: http://birmingham.pm.org/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2022-05-26 10:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (93 votes). Check out past polls.

    Notices?