Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!snorkelwacker!ira.uka.de!smurf!urlichs From: urlichs@smurf.sub.org (Matthias Urlichs) Newsgroups: comp.lang.perl Subject: Re: sort Message-ID: <0n/9f2.!-b@smurf.sub.org> Date: 5 Sep 90 22:28:24 GMT References: <9384@jpl-devvax.JPL.NASA.GOV> <15819@bfmny0.BFM.COM> Organization: University of Karlsruhe, FRG Lines: 31 In comp.lang.perl, article <15819@bfmny0.BFM.COM>, tneff@bfmny0.BFM.COM (Tom Neff) writes: < In article <9384@jpl-devvax.JPL.NASA.GOV> lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) writes: < >Other items sneaking in at the last moment. Filetests -M, -A and -C will < >return the file's age in days (possibly fractional) at the time the script < >started. This will make it much easier to write middle-of-the-night < >skulkers. < < Why when the script started? Why not their age NOW? That way you could < not only write middle-of-the-night skulkers, but usable Perl daemons to < check for things at intervals. < On the other hand, other useable Perl daemons might get started once a day/night/week, and may do some lengthy tasks (like analyzing log files, which is kind of what Perl seems to be meant for originally (other than writing an RN replacement of course ;-) )) before looking at the date of the next file. In that case, the script will presumably be started at the same time every [interval] and testing the age of files will not leave any "windows" which could conceivably skew the statistics. Anyway, it's trivial to convert between one way and the other via the time function and a division by 24*60*60... < If the objection is nonetheless sustained, how about making the "$NOW" < variable used by -[MAC] modifiable by the programmer. < ...or by saying "$NOW = time", of course, if Larry decides to implement it that way. -- Matthias Urlichs -- urlichs@smurf.sub.org -- urlichs@smurf.ira.uka.de Humboldtstrasse 7 - 7500 Karlsruhe 1 - FRG -- +49+721+621127(Voice)/621227(PEP)