in reply to Finding files in a directory tree from and array of file names
use File::Find; use strict; my @directory = ("\src"); my @sourcefiles; my $srcfile; find(\&sourcefind, @directory); sub sourcefind { open(FL, $File::Find::name); push @sourcefiles, $_ if -f and /\.htm*/ ; close(FL); } foreach $srcfile (@sourcefiles) { find( sub {print "$_ target found\n" if -f and /\Q$srcfile\E/;}, 'D:\Projects\perl\targ'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Finding files in a directory tree from and array of file names
by tommyw (Hermit) on Oct 15, 2001 at 17:10 UTC |