#!/usr/bin/perl -w use strict; use File::Find; my $result = "result.txt"; my $dir = "C:\\test\\"; my @files=findFiles($result,$dir); print join("\n", @files),"\n"; sub findFiles { my $file=shift; my @dirs=@_; open (my $fh, "<", $file); while(my $regexp=<$fh>) { chomp ($regexp); find(sub { push( @found, $File::Find::name ) if ($_ =~ /$regexp/); }, @dirs); } close $fh; return @found; }