in reply to Getting the Latest Date Issue

I'd suggest doing the things in two steps.
1. Push the dates to an array and 'reverse' it.
2. Foreach date do the printing.

Replies are listed 'Best First'.
Re^2: Getting the Latest Date Issue
by Anonymous Monk on Jan 22, 2008 at 19:20 UTC
    I can reverse it, but how could I get today's date to be printed as well, it is stating from tomorrow's date.

    my @date_dd_to_r = reverse @date_dd_to; print "\n@date_dd_to_r\n";
      You are starting with today's date and the first thing you do in your cycle is to add one day.

      To keep the cycle untouched, you should subtract one day to the initial ($year,$mon,$mday), so that the first iteration gives you today.
        If I do this
        ($year,$mon,$mday) = Add_Delta_Days($year,$mon,$mday,-1); the dates go backward, where else could I subtract to get today's date printed?