my $_timestamp1 = '1189669351'; my $_timestamp2 = '1189395751'; my $_timebetween = $_timestamp1 - $_timestamp2; # $_timebetween now has 273600 which if I do (273600 / (60 * 60 * 24) it is 3.1666666666666666666666666666667