in reply to Re^3: reading file names to an array from the directory tree
in thread reading file names to an array from the directory tree

One stupid question. in() and name() are subs in the package. What is file() there?
use File::Find::Rule; # find all the subdirectories of a given directory my @subdirs = File::Find::Rule->directory->in( $directory ); # find all the .pm files in @INC my @files = File::Find::Rule->file() ->name( '*.pm' ) ->in( @INC );

Replies are listed 'Best First'.
Re^5: reading file names to an array from the directory tree
by ikegami (Patriarch) on May 23, 2010 at 22:31 UTC
    file, name and in are all three class methods and object methods. file filters out results that fail a -f test.
      But where is a description of file() method? I did not find it. And what is the role of:
      my @files = File::Find::Rule ->file()

        In the big table at the top.

        To only returns the results that pass a -f test.