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