in reply to time difference calculation

To harp on a very, very, very, very, very, very important point, always

use strict;

During development, always

use warnings;

Some will argue warningsshould stay in production code; I disagree but this is a local decision anyway.