in reply to Re: Passing file names to search directories
in thread Passing file names to search directories

Great explanation, but how would I use this line or the array @filenames:
my @filenames = map { $_->{'filename'} } @{ $fnames };

in this line:
find( { wanted => sub { push @files, $_ unless $_ eq '.' || $_ eq '..' + || $_ !~ m/@filenames$/} , no_chdir => 1 }, @dirs);

That's where I am trying to understand the most, thanks!

Replies are listed 'Best First'.
Re^3: Passing file names to search directories
by Anonymous Monk on Dec 28, 2016 at 21:07 UTC
    I found that this way, it works:
    my @filenames = map { $_->{'filename'} } @{ $fnames }; my $rx_fnames = join '|', @filenames; find( { wanted => sub { push @files, $_ unless $_ eq '.' || $_ eq '.. +' || $_ !~ m/$rx_fnames$/} , no_chdir => 1 }, @dirs);

    Any feed back is welcome!