in reply to Reporting "percent done" while processing a large file

Whether you're processing text or binary, the point is to show some sort of progress towards the end goal. Now for text this kind of assumes that the lines are somewhat balanced (the standard deviation of their lengths isn't outrageous). You don't need to be too exact though, and tell() can be your friend:
open(F, "/usr/dict/words") || warn; # File to process $s=-s F; $|=1; while(<F>) { # Binary read() or readline()...whatever. # Do something with the data I presume... printf "\rComplete %.2f", 100*tell(F)/$s; }
For large files this slows things down considerably. You may want to try:
printf("\rComplete: %.2f", 100*tell(F)/$s) unless $i++ % 10;
Or something like it so there's not quite so much output.