Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use File::Find; my @directory = ("src"); my @sourcefiles; find(\&sourcefind, @directory); sub sourcefind { open(FL, $File::Find::name); push @sourcefiles, $File::Find::name if -f and /\.htm*/ ; close(FL); } foreach $srcfile (@sourcefiles) { find(\&targetfind, 'D:\Projects\perl\targ'); } sub targetfind { open(FL, $File::Find::name); # process the target file print $_." target found\n" if -f and /$srcfile/; close(FL); }
|
|---|