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

No need to answer, I got it. File::Find::Rule works perfectly ! Thanks !
  • Comment on Re^3: reading file names to an array from the directory tree

Replies are listed 'Best First'.
Re^4: reading file names to an array from the directory tree
by vit (Friar) on May 23, 2010 at 22:04 UTC
    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 );
      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()