in reply to Opendir and regex
opendir RDIR, $path; my @DIRLIST = grep { ( /search pattern/ ) && !/\.gz$/ } readdir RDIR; [download]