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

In the big table at the top.

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

Replies are listed 'Best First'.
Re^8: reading file names to an array from the directory tree
by vit (Friar) on May 24, 2010 at 00:52 UTC
    Am I right that it may filter out "." and ".." files?
    However, when I did
    my @files = File::Find::Rule ->name( '*' ) ->in( @subdirs );
    there was no "." and ".." files. So how they were filtered out?
      It makes no sense to include "." and ".." — they would be redundant or outside the selected branch — so they are never included except "." if it was the provided path.
      >perl -MFile::Find::Rule -E"say for File::Find::Rule->in('.')" . a b bar bar/bar foo foo/foo >perl -MFile::Find::Rule -E"say for File::Find::Rule->file->in('.')" a b bar/bar foo/foo