in reply to suggestions for log rotater...

If all you want is the day, month, and year, you can use the builtin localtime to get this information.
my ( $day, $mon, $year ) = (localtime(time))[3,4,5]; my $timestamp = sprintf( "%04d%02d%02d", $year, $mon, $day ); #continue...

-----------------------------------------------------
Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

Replies are listed 'Best First'.
Re: Re: suggestions for log rotater...
by Starky (Chaplain) on Nov 05, 2001 at 11:51 UTC
    You may want to $mon++ since $mon goes from 0 to 11 rather than 1 to 12.

    Hope this helps :-)

      And make sure to add 1900 to the year...

      use strict; use Time::localtime; my $mCurrentTime; my $mTimeStamp; $mCurrentTime = localtime; $mTimeStamp = sprintf( '%04d%02d%02d', ($mCurrentTime->year)+1900, ($mCurrentTime->mon)+1, $mCurrentTime->mday );