Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Help using Find::File::name

by stefbv (Curate)
on Nov 28, 2010 at 10:35 UTC ( [id://874091]=note: print w/replies, xml ) Need Help??


in reply to Help using Find::File::name

Your question has been answered, this is my answer to the question you didn't (directly) ask, how can I easily find all (nonempty) files with a '.wgt' extension in a specified path.

use strict; use warnings; use File::Find::Rule; my $search_path = '.'; my @files = File::Find::Rule ->name('*.wgt') ->file ->nonempty ->in($search_path); foreach my $file (@files) { # do something with '$file' }

The downside is that File::Find::Rule is not a core module yet, but my opinion is that it should be. Anyway the great power of Perl stands in the huge library of modules on CPAN.

Regards, Stefan

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-25 13:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found