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


in reply to Read Directory and getlines in .csv

I know not everyone is a fan of File::Find::Rule, but I'm so used to it that it's just a quick hack for me. The following returns a list of all files with a .csv extension, in a given directory, modified within the last 24 hours. The rest, of course, should be straightforward after this.
use File::Find::Rule; my $dir = 'lib'; # or wherever they're located my $last_24_hours = time - 86_400; my @files = File::Find::Rule->file->name('*.csv')->mtime(">$la +st_24_hours")->in($dir);