in reply to Reg Expression on file name

You're mixing shell glob patterns with regex patterns.     next if($file !~ /^AB\sDAT.*\.doc$/i); will do the job.

After Compline,
Zaxo