in reply to Calculating 1-day-before

This will do what you want:
($d,$m,$y)=(localtime((time-60*60*(12+(localtime)[2]))))[3,4,5];


TStanley
--------
"Suppose you were an idiot... And suppose you were a
member of Congress... But I repeat myself." -- Mark Twain

Replies are listed 'Best First'.
Re: Re: Calculating 1-day-before
by ehdonhon (Curate) on Feb 15, 2002 at 21:26 UTC

    That will break for time zones that use daylight savings time. On the days where the clock is set back an hour, you will not be subtracting enough from time() to make that work. Better to use Date::Calc, as suggested elsewhere in this thread.