in reply to Getting Day Of Month

My favorite way to do that would be with Date::Manip -

use Date::Manip $day=&Date_DayOfWeek($m,$d,$y);

If you have any funny date/time stuff that you want to do, a good first step is always "perldoc Date::Manip" because most likely it can do exactly what you want.