in reply to Reading specific files from a directory

You can check the filename with a grep:
opendir(DIR, $somedir) or die "can't open $somedir for read: $!\n"; @files_i_want = grep { /^example\d(?:\.\d)*\.txt$/ } readdir DIR; closedir(DIR) or die "error closing $somedir: $!\n";
Then use @files_i_want as desired.

--sacked