#!/usr/bin/perl -w use strict; use File::Find; my @directories = (".", "I:\\Temp\\"); my @foundfiles; print "Please drag error list \n\t\t"; chop($jpglist=); open (JPG, "$jpglist") || die "can't open JPG"; @jpeg = ; close(JPG); foreach $line(@jpeg); { find( sub { push @foundfiles, $File::Find::name if /$line/ }, @directories ); open (OUT, ">>I:\\temp\\Outlist.txt") || die "can't open jpgfiles"; print OUT join("\n",@foundfiles), "\n"; close(OUT); }