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.
In reply to Re: Tracking Lines Printed to a FileHandle
by simonm
in thread Tracking Lines Printed to a FileHandle
by ketema
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |