in reply to Re: Re: Re: using $ftp->mdtm($file)
in thread using $ftp->mdtm($file)
You are almost right in your assumption that $timeThen is an epoch time stamp (in fact time-(14*24*60*60) to give time in seconds 14 days ago). Also $connect is the same as $ftp in your code. I am using warnings and strictures.
Unfortunately, even using your modified code my program still dies on the first .stm file it finds with the 'cannot get mdtm' message.
However, if I comment out the 'die "cannot get mdtm ..."' line, I get this error message displayed (for every .stm file in the directory): "Use of uninitialized value in localtime at mdtm_test.pl at line 36."
(Line 36 is the 'print "$file last modified ... "' line). Then it prints the time last modified as "file name last modified : Thu Jan 1 00:00:00 1970"! The epoch if not much mistaken. Obviously my .stm files have been modified since then.
Not entirely sure what that error message is telling me but it's a start. I realise I will have to convert either the modified time into secs or the $stamp time into an epoch time stamp (possibly using POSIX strftime).
Thanks again for your time
Stewartski
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: using $ftp->mdtm($file)
by Limbic~Region (Chancellor) on Feb 25, 2004 at 16:14 UTC | |
by stewartski (Initiate) on Feb 26, 2004 at 12:04 UTC | |
by Limbic~Region (Chancellor) on Feb 26, 2004 at 13:51 UTC |