You could probably do something like this:
# assuming @epoch_times contains the data use constant ONE_DAY => 84_600; # seconds per day my %per_day; for my $time ( @epoch_times ) { my $key = int $time / ONE_DAY; if ( exists $per_day{ $key } ) { $per_day{ $key } = $time if $per_day{ $key } < $time; } else { $per_day{ $key } = $time; } } @epoch_times = values %per_day;
In reply to Re: epoch reduction
by jwkrahn
in thread epoch reduction
by neilwatson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |