in reply to Deleting files over 2 weeks old?

If this were a UNIX system, I might skip Perl altogether, and use the builtin find command instead.

# cd root_directory_I_need_to_cull # find . -mtime +14 -exec rm {};
(Note: # is root prompt, not comment mark :)

You might need to escape the ; in your shell. You can specify -atime, -ctime, or -mtime to check the access time, inode change time (approximately file creation time), or modification time for the file.

But since this is a Perl site, and not a Unix site, I'd recommend using the File::Find module, and perl's built in file testers -M, -C, and -A to filter out based on file times.

Or, as perldoc File::Find says, you can use find2perl to change a "find" command into a perl code snippet using File::Find which does the same thing.

Options, options, options...

Alan