my @dots = grep { /^\./ } readdir(DIR);Your regular expression says to match only file names that begin with a period, you probably want:
Which will match only "plain" files or:my @dots = grep { -f } readdir(DIR);
Which will match only JPEG files.my @dots = grep { /\.jpg\z/i } readdir(DIR);
In reply to Re: reading all files in a dir
by jwkrahn
in thread reading all files in a dir
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |