http://www.perlmonks.org?node_id=1054281


in reply to list files based on age and pattern

I prefer to use File::Find::Rule for this kind of thing, it's easy to use and very flexible.

So your query could look like this :-

my @files = File::Find::Rule->file->name('_NSA*.xml')->mtime('<' . (t +ime() - 60 * 15) )->in($path);