in reply to Reading specific files

To deal with the files starting with "R" I have tried using variations on glob
my @files = glob("$directory/R*");
No need for a regular expression. You might have to use File::Glob 'glob'; if files or directories in your pattern have imbedded whitespace.