in reply to Re: read an array of file
in thread read an array of file

And to complete the original request :

my $path = "/path-to/some-dir"; opendir(DIR, $path) || die "Could not read $path - $!\n"; for my $fileFound (grep /^loyl\d+i_lgr\.sss$/, readdir(DIR)) { # do stuff here... }
or
my $path = "/path-to/some-dir"; opendir(DIR, $path) || die "Could not read $path - $!\n"; while (my $fileFound = readdir(DIR)) { next unless $fileFound =~ /^loyl\d+i_lgr\.sss$/ # do stuff here... }

The second is better for large directories.

Jenda