in reply to How to substract date in perl?

Have you tried typing "date arithmetic" into the search box? Or looking into the "dates and times" section of "Q&A"? That should help...

update: (noting with some personal remorse that this was your first post...) Sorry to be less than helpful. Welcome! The short answer would be something like:

use Date::Manip; $currentDate = UnixDate( "today", "%Y_%m_%d" ); $currentMinusThree = UnixDate( "3 days ago", "%Y/%m/%d" ); print join " ", $currentDate, $currentMinusThree, "\n";
In other words, don't bother with trying to munge the output of the shell "date" command -- perl modules make things a lot easier than that.

Replies are listed 'Best First'.
Re: Re: How to substract date in perl?
by ferum (Initiate) on Feb 26, 2003 at 09:51 UTC
    thankss for all of you!!! your helps will be appreciated... i'm a newbie here... so, need to learn a lot... ;)