in reply to Reading every file in a directory
I'm really tired and maybe missing something, but is there any reason you can't just run this in the shell?
find /path/to/dir -mtime +5 -type f|xargs rm
If the files are only getting updated when the user last logs in then that's a perfectly acceptable solution and doesn't involve you having to parse the files in question.
(ninja edit - add restrict to files)
|
---|
In Section
Seekers of Perl Wisdom