On 11-03-02 11:34 AM, newbie01 perl wrote:
My main hurdle is the file timestamp and date arithmetic part. Frm
Google'ing, am leaning towards using stat which am hoping will work on both
Unix and Windows.

Some guidance will be much appreciated. Thanks in advance.

Use the stat function to get the mtime of the files. The one with the biggest is the most recent.

Compare it to now and if now > mtime + 2 * 24 * 60 * 60 then output your message.

Use strftime() from POSIX to change the epoch seconds to human readable form.

See:
perldoc -f stat
perldoc -f time
perldoc -f localtime
pelrdoc POSIX and search for /strftime/.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to