Instead of trying to match everything except those two names, match those two names and negate the test. Also, be sure to check for and report errors.
opendir my $dh, $dir or die "Can't opendir '$dir': $!"; my @files = grep { ! m{ \A \. \.? \z }xms } readdir $dh; closedir $dh or die "Can't closedir? $!";
In reply to Re: selcting all files in a given directory except......
by kyle
in thread selcting all files in a given directory except......
by asdfghjkl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |