$sum{ $daystamp <= $stoptime ? 'first' : 'second' } += $linesum;