in reply to rm old directory

Well, in the bash shell I'd say something like:

find . -mtime -59 -type d -print | xargs rm -rf
(the argument may not be exactly right, do a man on find for the right args, and I'd also do whatever option xargs has to *not* execute if nothing comes down the pipe, but then this is a perl question, so ...)

Well, so in perl I'd do something dumb like run the 'find' command above (without the rm), fiddle with the output in any way I felt reasonable, then either use a perl-based 'rm -rf' or run another shell command.

Not very perl-ish, I'm afraid, and probably pushing the 'more than one way to do it' a bit too far, but if you wanted to perl-ize it more do a cpan lookup for a 'find' replacement (which I'm sure you could write or find - I mean, its just 'open directory', get its age, and recurse), and for a 'rm -rf' replacment).

Oh, goodness: there is a 'find' at http://search.cpan.org/perldoc?File::Find but it doesn't check the status. Perhaps you should check out 'find2perl', to which you give my above script (or something similar), and it will spit out the perl... see http://search.cpan.org/~nwclark/perl-5.8.8/x2p/find2perl.PL