Perl: the Markov chain saw | |
PerlMonks |
Re^4: perl basic count days between two datesby scripter87 (Novice) |
on Oct 03, 2013 at 12:34 UTC ( [id://1056757]=note: print w/replies, xml ) | Need Help?? |
ok using the debug method you have shown my numberofdays sub seem to be out by 1. e.g print "1,1,1,1 == " = O- which is ok. print "1,1,5,1 == " = 0 because the format of the sub is d,cd,m,cm: so when I changed it to 1,1,1,5 it printed 121- which is ok. Now here is where it got weird. "1,1,1,2 == 32 (should be 31) again print "8,3,3,8 == 149 (should be 148). How is it possible to be half correct??
In Section
Seekers of Perl Wisdom
|
|