in reply to how do I shorten code

PS: If you want it in one liner style this will do:

my $dir = 'c:'; my $logfile = 'c:/log.txt'; `echo $_ >> $logfile` for grep { m!^\Q$dir\E/B.+txt$!i and -M $_ < 1 } + glob( "$dir/*" );

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print