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.

Thanks.
r5ur5Asked:
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.

pedronCommented:
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:

java.io.File file = new java.io.File(yourDirectoryPath);

String files[] = file.list();

for(int i=0;i<files.length;i++){//this loop will go through each file in the given directory...
  if(files[i].isDirectory()){
     //in this loop you can look at each directory individually and do whatever you want...
     //for instance, get the modified time:
      java.io.File temp = new java.io.File(files[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.
pedronCommented:
???

then why did you post under the java section?

am i missing something? let me know. thanks
ozoCommented:
#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
CEHJCommented:
>>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
Perl

From novice to tech pro — start learning today.