Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Read Directory and getlines in .csv

by Cristoforo (Curate)
on Apr 27, 2016 at 16:45 UTC ( [id://1161656]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1161656]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2024-04-20 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found