in reply to Live operations-per-second counter

Most "speed" counters usually show the overall speed, not the current speed. Thus, you can even just print this out every x number of lines, and just divide the number of lines processed so far by the time elapsed (you may want to use Time::HiRes for that).

Or, rather than simply every x lines (where x may need to be large to keep from printing to STDOUT too often - STDOUT is actually very slow, so you don't want to waste too much time printing to the console), every x lines (where x can be much smaller) check the time (not HiRes) to see if the seconds have changed, and then print out (using HiRes, or not) the speed.