Hi guys, very new to perl and I suck Im trying to right a program that seems simple but my mind just cant get it right. I want to count the days between 2 dates without any modules, I have seen the modules do it pretty easily.. but I cant do it manually!! here is a bit of code to give an idea of what I am talking about.

if ($year >$thisyear){ warn "Birth Year is after this year.???"; } #here is my problem, i want it to be full years e.g 365 days apart not just #1 date says 2012 and the next says 2013 elsif ($year == $thisyear){

if $startMon == $endMon && $startDay<= $endDay){ $daysBetween = $endDay- $startDay; } else { $daysBetween =(($startDay-1)-(amountOfDaysInMonths($startMon ))) + $endDay + &seriesOfDaysInMonths$startMon, $endMon ); } } return $daysBetween; } #I dont have the data for the other sub routines available right now- but take it as they are ok. #my main concern is trying to undertsand the idea of having the full year in the above sub routine.

so just incase it is not clear enough in the code statements. I want to amount to an actual year in the problem I stated in the code because right now I only have it as if year==this year but obviously years could be different and not actually be a full year apart e.g. dec-2001 & jan 2002 are not a year apart. Cant get the idea of how to code that.