in reply to Calculating clock time within a period.
Erm, given start and end as time_t values (use Date::Parse or whatever to get them there) just convert your interval into seconds and add.
sub intervals { my( $start, $end, $interval ) = @_; my @ret; my $cur = $start; while( $cur <= $end ) { push @ret, $cur; $cur += $interval; } return @ret }
|
|---|