How to find number of bytes written to STDOUT

In a CGI script I write a lot of stuff to STDOUT. Is there an easy way to find how many bytes I have written after I've done it?
LVL 10
rj2Asked:
Who is Participating?
 
PC_User321Connect With a Mentor Commented:
After every print add the line
   $TotalLength += length "Put the same string that went to STDOUT in here.  (Variables are OK)";

Alternatively write everything that goes to STDOUT to a temp file too, and check the size of that file.

0
All Courses

From novice to tech pro — start learning today.