http://qs321.pair.com?node_id=60413

BatGnat has asked for the wisdom of the Perl Monks concerning the following question:

Hey Guys + Girls.
I need a quick way to delete file older than 12 weeks(3 months).
When I say quick I mean in relation to the 450,000+ files in that directory. My own experiences lead me into something like this:
open(DIR,"c:\directory\"); foreach (readdir(DIR)) { Del_File() if (-M > (scaler localtime - TWELVE_WEEKS); } close(DIR);
But as you can notice this could be rather slow, So does anybody know of a quick way of doing this sort of this on a large number of files. I am running W2k

BatGnat

BALLOT: A multiple choice exam, in which all of the answers above are incorrect!