in reply to time difference in milliseconds

You could convert to seconds and use the result for your calculations. The conversion is straightforward:

my ($h, $m, $s) = split /:/, $time; my $time_in_secs = $h * 60 * 60 + $m * 60 * $s;

Regards,

PN5