Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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


Comment on Re: Progress Bar in Perl script
Select or Download Code

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 perusing the Monastery: (21)
As of 2014-10-30 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (208 votes), past polls