#!/usr/bin/perl -w use strict; use File::Find; my $result = "result.txt"; my $dir = "C:\\test\\"; findFiles(); sub findFiles { my $tmp; my @found = (); open (FILE, "<$result"); while(){ $tmp = $_; chomp ($tmp); find(sub {if ($_ =~ /$tmp/){push @found, $File::Find::Name}}, $dir); } close FILE; print @found; }