Re: Scan/Parse directory for "newest" file, print file timestamp andcompute date/time diff

--20cf300258b8e9707b049d83460b
Content-Type: text/plain; charset=ISO-8859-1

On Mar 2, 2011 12:16 PM, "Shawn H Corey" <shawnhcorey [at] gmail.com> wrote:
>
> On 11-03-02 12:12 PM, shawn wilson wrote:
>>
>> First, use File::Find to get your info (or you could use system( ls -l )
and
>> split - either way). To compare your time stamps, use DateTime and do dt1
-
>> dt2
>>
>
> No. If you can do all your calculations using seconds from the epoch,
then do so. Only convert them to human-readable form for the output.
>

Seems like more of a pain for a modest gain in speed to me. I like find and
dt because its quick and easy. Either way though.

--20cf300258b8e9707b049d83460b--
Shawn Wilson [ Mi, 02 März 2011 18:31 ] [ ID #2056084 ]

Re: Scan/Parse directory for "newest" file, print file timestampand compute date/time diff

On 11-03-02 12:31 PM, shawn wilson wrote:
> Seems like more of a pain for a modest gain in speed to me. I like find and
> dt because its quick and easy. Either way though.

No, because you don't have to worry about daylight-savings time or
switching time zones. Seconds from the epoch is the same on all
computers and in all time zones.


--
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-unsubscribe [at] perl.org
For additional commands, e-mail: beginners-help [at] perl.org
http://learn.perl.org/
Shawn H Corey [ Mi, 02 März 2011 18:37 ] [ ID #2056085 ]
Perl » gmane.comp.lang.perl.beginners » Re: Scan/Parse directory for "newest" file, print file timestamp andcompute date/time diff

Vorheriges Thema: Scan/Parse directory for "newest" file, print file timestamp andcompute date/time differen
Nächstes Thema: How to list all Linux machines info with perl ?