Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Progress Bar in Perl script

by Jim (Curate)
on Jul 10, 2012 at 00:16 UTC ( #980790=note: print w/replies, xml ) Need Help??


in reply to Progress Bar in Perl script

I usually do something simple like this:

printf {*STDERR} "%d\r", $INPUT_LINE_NUMBER;

…or…

printf {*STDERR} "%d\r", ++$tally_of_something;

This has the advantage of not only showing that the script is actively doing something, but of also giving the user an idea of the amount of progress even when the percentage of progress cannot be computed.

Jim

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://980790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (8)
As of 2016-09-28 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Extraterrestrials haven't visited the Earth yet because:







    Results (534 votes). Check out past polls.