in reply to odd or even day?

Dividing an integer by 24 and then muliplying it by 60*60 is equivalent to multiplying it by 150 -- which will always result in an even number.

But there's also a problem with your date math: Assuming that you want to know if the day of the month is odd or even, use Perl's localtime function or, for advanced functionality, DateTime. Unless you want to deal with leap years, months with 28, 30, 31 days etc yourself.