in reply to date subtraction

Use a module like Date::Calc and the Delta_Days method. Or Date::Manip. Or use HTTP::Date to translate the date to seconds subtract them and divide by seconds of a day.
use HTTP::Date; print ( str2time($date1) - str2time($date2) ) / 3600;
Boris