Help for this page
opendir(my $dh, $dir) or die("opendir: $!\n"); ... grep { ( !/\.(?:txt|prn|csv)\z/ && /$SrcPattern/ ) || -z } map "$dir/$_", readdir($dh);