Eric on 22 Apr 2006 06:03:19 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Perl question



On Saturday 22 April 2006 1:41 am, mjd-list-plug2@plover.com wrote:
> 
> > from my Camel book....
> > -M Age of file (at startup) in days since modification
> > -A Age of file (at startup) in days since last access
> > -C Age of file (at startup) in days since inode change
> > 
> > ?!! in days?   That's probably no help.
> 
> "In days" is exactly the same as "in seconds", except that the numbers
> are all divided by 86,400.
> 
> > To get seconds,
> 
> There's nothing magical about seconds.  To compare the dates of two
> files, you don't need seconds.  You just need to compare them:
> 
>         if (-M '.y2log' < -M '.y2log-1') {
>           print ".y2log is newer than .ylog-1\n"; 
>         } else {
>           print ".y2log is olfer than .ylog-1\n"; 
>         }

Ok, thanks.  I'll use this.  It's really close to being as simple
as it gets.  I like simple!

Muchas Gracias,

Eric
-- 
------------------------------------------------------------------------
#  Eric A Lucas
#  ------------
#   "Oh, I have slipped the surly bond of earth
#    and danced the skies on laughter-silvered wings... 
#        -- John Gillespie Magee Jr.
___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug