in reply to time diff in minutes

As SuicideJunkie pointed out "0150" is not the same as "1350". But here is some pared down code to convert "HH:MI" timestamps to "epoch":

use Time::Local; my $t1 = "1245"; my $t2 = "1350"; my $beg = ConvHHMI($t1); my $end = ConvHHMI($t2); my $diff = $end - $beg; my $t3 = $diff / 60; print "Begin=$t1 ($beg), End=$t2 ($end), Diff=$t3 ($diff)\n"; sub ConvHHMI { my $w_date = shift @_; my ($sec,$min,$hour,$mday,$mon,$year,$misc) = (0,0,0,1,0,0,0); ($hour, $min) = $w_date =~ /^(\d\d)(\d\d)$/; return timelocal($sec,$min,$hour,$mday,$mon,$year); }

Results:

Begin=1245 (946759500), End=1350 (946763400), Diff=65 (3900)