in reply to Re: Read Directory and getlines in .csv
in thread Read Directory and getlines in .csv

You could avoid the use of File::stat by checking for csv files less than a day old with

my @today = grep /\.csv$/ && -M "$dir/$_" < 1, readdir DIR;

(See file test ops).

Replies are listed 'Best First'.
Re^3: Read Directory and getlines in .csv
by Anonymous Monk on Apr 27, 2016 at 16:57 UTC

    To avoid confusion: that works, but -M also stats the file, and does not return the same thing as the mtime field.

Re^3: Read Directory and getlines in .csv
by Dipepper (Novice) on Apr 27, 2016 at 17:27 UTC

    I have used this site to learn many things. I thought I read that -mtime was more consistent than -M?