The more I think about it, the more I think that for most needs it's probably best to just count newline characters immediately prior to printing:
$count += $print_string =~ tr/\n//; print OUT $print_string;
...why get tricky with something so easy, right?
Dave
In reply to Re: Tracking Lines Printed to a FileHandle
by davido
in thread Tracking Lines Printed to a FileHandle
by ketema
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |