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

Well my Perl skills are pretty weak, but here's what I usually do: I make a cheesy text status bar. More or less print a line that sort of marks where the progress is, then print an '*' for something like every 5% done. Usually I just use the stat function to find the file size, and divide by the number of astriks you want in the bar, etc (this similar to a computer science problem I once had in college). There is some computational overhead with comparisons with an accumulator, but as far as I can tell, not a whole lot. (I'd post some code, but truthfully my code looks pretty sad).
  • Comment on Re: Reporting "percent done" while processing a large file