http://www.perlmonks.org?node_id=599754

batcater98 has asked for the wisdom of the Perl Monks concerning the following question:

I have a need to count certian files in a given directory on a windows box. I have tried using Find and have even played around with Slurp, but can not get what I want. I am trying to count up all files that end with the extention of .dat and skip the rest and then output the count to a flat file. Suggestions? Thanks.