How to find the last access date on a directory in PERL

Hi all
I am searching through 11000 directories and I would like to find the last modified date of each directory. What would be the solution.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

do all the directories share the same root directory? if so, there is an easy answer, but i think it will take a significant amount of processing time to do that many directories. Anyways, you can just instantiate an object: file = new;

String files[] = file.list();

for(int i=0;i<files.length;i++){//this loop will go through each file in the given directory...
     //in this loop you can look at each directory individually and do whatever you want...
     //for instance, get the modified time: temp = new[i]);
      long time = temp.lastModified();
   }//end if


this solution is the obvious one, though it is probably not optimal time-wise. If time is not an issue, than use it by all means! it may actually be the only solution so you may have to use it either way!
r5ur5Author Commented:
Time is not an issue but I am trying to find a solution in PERL.
Thanks for your response.

then why did you post under the java section?

am i missing something? let me know. thanks
#If your 11000 directories are all directories on a file system
use File::Find;
find(sub{-d && print "$File::Find::name\t".localtime((stat)[9])."\n"},"/");

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
>>but I am trying to find a solution in PERL.

Wrong TA
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.