in reply to Re: Directories without recursion and exceptions
in thread Directories without recursion and exceptions

Not sure if FFR can do this directly, but my File::Finder can also do:
use File::Finder; my @search = qw( /usr/local/ ); my @abs_dirs = qw ( /usr/local/share/locale ); my %abs_dirs; @abs_dirs{@abs_dirs} = (); my @dirs = File::Finder->type('d')->eval(sub { not exists $abs_dirs{$F +ile::Find::name}})->in(@search);

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

Replies are listed 'Best First'.
Re^3: Directories without recursion and exceptions
by davidrw (Prior) on Feb 21, 2006 at 15:08 UTC
    All in one w/FFR:
    my @files = File::Find::Rule->directory()->exec( sub { ! exists $abs +_dirs{$_[2]} } )->in( @search );
    I was actually looking at both FFR and File::Finder for this task .. codes comes out pretty similar for both :)