If you're looking for an elegant solution using Perl, you're doing it wrong. smile

If I'm understanding you right, I think you just want to do something like this:

1. Grab first timestamp in the file, let's call it "t0"
2 The first quarter-hour timestamp (t1) is going to be:
t1 = t0 + 900 - (t0 % 900)
3. Then you just loop, looking for t1 + n*900, until it fails or you hit EOF.

That's what you mean by a "math based" solution, right?
_________________________
- Tony C
my empeg stuff