HOw to check in Perl script that directory older then 60 (or other) days old?

Can't Post

I need to check that my directory older then for example 60 days. For the file I used: die unless opendir DIR, "."; foreach my $fname (grep {-f && (5 <= -M)} readdir DIR) { do something } Can I have something similar to determine directory and remove it with file? (How to rmtree I know)

Re: [FishMonger] HOw to check in Perl script that directory older then 60 (or other) days old?
[In reply to]

Can't Post

But what will be in DIR? files on the directory? I don't need them. I need directories, which are older 60 days. Foreach will not work in this case I think. If I readdir DIR, then I read files on that directory