in reply to Re^2: Extract lines between two values from file
in thread Extract lines between two values from file

Hi aaron_baugher,

Yes, after reading up on flip-flop I became aware of the fact that both values must exist. :-) It's 99,9999% guaranteed that these logs has something written in them each and every second.

A good enough "solution" to make it stop (at least approximately around) the time it should, if the $end_point second is non-existent, might be to just set $end_point to "09:05". Worst case scenario, the same SMS-message(s) might be counted within two different time periods, but like I said it's almost sure that something is written in the logs every second.

As you probably understood I'm not a perl-programmer, and I can barely call myself Google-perl'er. Therefor I'm not sure if I want to try other methods when this is (probably/hopefully) going to work most of the time.

Of course, like you say, it's possible that the timestamps are out of order, and that the script should be more robust. I guess I'll have to google a bit after all... :-)

Thanks a lot for your input!

  • Comment on Re^3: Extract lines between two values from file