Something like this perhaps...
--use strict; my $start = '12:34:26'; my $end = '14:48:52'; my @start = split(/:/, $start); my @end = split(/:/, $end); $start = 60 * 60 * $start[0] + 60 * $start[1] + $start[2]; $end = 60 * 60 * $end[0] + 60 * $end[1] + $end[2]; my $elapsed = $end - $start; print $elapsed;
"Perl makes the fun jobs fun
and the boring jobs bearable" - me
In reply to Re: time session problem
by davorg
in thread time session problem
by lelak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |