I'm having a difficult time finding a way to traverse a directory structure
and then perform some simple operations on files in the directories.

I want to traverse a directory structure and then remove the oldest file in
each subdirectory. Something like this:

## traverse the directories and in each directory, if there are at least N
files in the directory, in remove the oldest file in that directory.
##
foreach($dir (@dirs) )
{
  ## if $dir has > N files of "*.ext"
  ## unlink the oldest one.
}

I've been Looking at File::Find but I'm baffled by the examples and usage
and the "wanted" function.

Where can I look to find some modules and functions for this?

Thanks,

--
Ed

Reply via email to