in reply to reading file names to an array from the directory tree

File::Find::Rule, etc
  • Comment on Re: reading file names to an array from the directory tree

Replies are listed 'Best First'.
Re^2: reading file names to an array from the directory tree
by vit (Friar) on May 22, 2010 at 23:35 UTC
    I also want to have paths to this file starting from an indicated directory so that I can use open file command.
      Obviously. The answer doesn't change.
      No need to answer, I got it. File::Find::Rule works perfectly ! Thanks !
        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 );