Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
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 taking refuge in the Monastery: (6)
As of 2015-07-01 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls