in reply to Re: Is there a better way.
in thread Is there a better way.

The way I normally do this is similar, but skips using the temporary @files array.

opendir my $dh, $dir or die "Unable to opendir [$dir]: $!"; my @uploads = grep /$pattern/, readdir ($dh); closedir $dh;

Sometimes I will add a map { "$dir/$_" } between = and grep, but it depends on the use.

l8rZ,
--
andrew