I am reading all the files in a specific directory. The function "opendir DIR, 'dir/to/somewhere/';" reads all the files in the dir. I just want to have files that satisfies the regex criteria in the file handle DIR.

the opendir assigns a file glob to DIR the readdir does the work of reading the contents of the directory. Yes it possible to filter the files by regex supply some more details about what to filter... spectific file .doc or .html .txt???