in reply to Date Trickiness

Use localtime to get the date 24 hours ago

my $newtime= POSIX::strftime "%Y%m%d", localtime(time - 60 * 60 * 24);

Replies are listed 'Best First'.
Re^2: Date Trickiness
by pijll (Beadle) on Oct 02, 2004 at 08:24 UTC
    Note that this can go wrong at DST changes, when a day is shorter or longer than 24 hours. If you want it to work on those days to, either use gmtime instead of localtime, run the script during daytime (or at least, not between 23:00 and 1:00), or use a module (such as DateTime).
Re^2: Date Trickiness
by monger (Friar) on Oct 01, 2004 at 19:06 UTC
    Thanks bmann. That did the trick. monger
    Monger +++++++++++++++++++++++++ Munging Perl on the side