in reply to Tracking Lines Printed to a FileHandle

No, I don't think there's any built-in way to do this.

If you can't count the lines before calling print, it should be feasible to create a tied handle class that counts them as they are printed.

  • Comment on Re: Tracking Lines Printed to a FileHandle