Hello SPUG gurus,
I'm stumped as to why the code below gets into an infinite loop on
November 4, 2012. I tried starting $current_date at Jan 1, 2011, and it
gets into an infinite loop on November 6, 2011. This is on a linux box
running perl 5.10.1. When I run it on another linux box running 5.8.8,
it works fine. Any idea what's going on? Thanks!
-J
use strict;
use Date::Manip;
my $current_date = '2012/01/01';
while (Date_Cmp($current_date, '2012/12/31')) {
print "Current date is: $current_date\n";
$current_date = UnixDate(DateCalc($current_date, "+1 days"),
"%Y/%m/%d");
}
print "Bye!\n";
_____________________________________________________________
Seattle Perl Users Group Mailing List
POST TO: [email protected]
SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list
MEETINGS: 3rd Tuesdays
WEB PAGE: http://seattleperl.org/