in reply to Counting only certain files...
I would suggest passing readir to a grep.
I used it in one of my scripts like so,
------
The Price of Freedom is Eternal Vigilance
I used it in one of my scripts like so,
This returned all files except '.' and '..' and a file named 'list.txt'.@Files = grep {not /^(\.\.?|list\.txt)$/} readdir(DIR);
------
The Price of Freedom is Eternal Vigilance
In Section
Seekers of Perl Wisdom