#!/usr/bin/perl use strict; # Specify the folder for file search my $startFolder = "D:\\XXX\\XXX\\"; opendir (DIR, $startFolder) || die "Can't access $startFolder"; # to search for the document foreach my $file (readdir(DIR)) { #Modified today and specify the file pattern next unless (-M $file <= 1 && $file =~ m/\ABC DEF GHI/); } closedir(DIR);