How do I create a hash in Perl which uses the directory name as the key, and then stores both the count of files in the directory as well as the names each of the files? Is it possible using hash of hashes or hash of arrays?
I would appreciate any pointers.
If I understand you correctly, this seems to do the trick (the printing of the hash using Dumper() at the end is just to show you what the hashref contains):