note
almut
<p> You could use [perldoc://stat|<c>stat()</c>]: </p>
<c>
if ( (time - (stat FILE)[10]) / (60*60*24) > 5 ) { ... }
</c>
<p> Actually, as <c>-M</c> is "<i>Script start time</i> minus file
modification time, in days", you'd have to store the return value
of <c>time()</c> right at the beginning of the script, to get the exact
equivalent for ctime... though I suppose the difference would be negligible. (<b>Update:</b> actually (RTFM :) — use <c>"perldoc -f -X"</c> to get the docs for the filetests...) there even seems to be an option [http://perldoc.perl.org/functions/-X.html|<c>-C</c>] which does just that...) </p>
<p> Alternatively (<b>Update2:</b> and preferably — see [kenneth]/[MidLifeXis]'s comments below), reset the modification time to what it was before, every time you make a modification... </p>
741594
741594