About 5 years ago I worked my way to the O'Reilly Perl for Win32 book, but haven't used it since. I have a need to write a Perl app that will check the timestamps of several known files in known locations. If the date/time of any of the files is not the current date, send email to a known list of recipients.
Can anyone get me started on how to check the date/time stamp of a file and compare it to the current day? I imagine this type of simple task is a no-brainer for almsot everyone on this list. Poking back through my book a bit now. All pointers to more info much appeciated. ;-)
off the top of my head, the only thing I can think of is the stat() function.
You could work a condition with the $atime, $mtime, and $ctime elements it returns to check to see the last modified file.
Might be some work to tell if it didn't match today's date, you will have to figure out how long since Epoch you are currently sitting, and how long since the previous midnight, and then compare that value to what is contained in $mtime.