my @dots = grep { /^\./ } readdir(DIR);
That finds all the files beginning with a . in your directory. You forgot to invert the regex for your grep. What you probably want is:
my @not_dots = grep { !/^\./ } readdir(DIR);
Then @not_dots will contain all the non-dotfiles.
In reply to Re: reading all files in a dir
by friedo
in thread reading all files in a dir
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |