modified: Makefile
[GalaxyCodeBases.git] / perl / etc / addtime.pl
blob96401c24c8c826127dd9e2df282facebb32584d2
1 #!/bin/env perl
2 use strict;
3 use warnings;
5 die "Usage: $0 <time ??m?.?s>\n" if @ARGV < 1;
7 my $totalsec=0;
9 while($_=shift @ARGV) {
10 print "[$_]: ";
11 /((\d+)m)?([.\d]+)s/ or (print "NULL\n" and next);
12 #print "$1, $2, $3\n";
13 my $sec;
14 if (defined $1) {
15 $sec += $2 * 60;
17 $sec += $3;
18 print "$sec s\n";
19 $totalsec += $sec;
21 print "Total: $totalsec s\n";