Help for this page

Select Code to Download


  1. or download this
    my ($starttime, $isopen, $totaltime) = (0, 0, 0);
    while (<TIMELOG>) {
    ...
          $totaltime += getseconds($_) - $starttime;
       }
    }
    
  2. or download this
    @lines = <TIMELOG>;
    push @lines, makefake(time(), "closed");
    for (@lines) {
       # Same loop body
    }