Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
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 browsing the Monastery: (8)
As of 2016-06-28 11:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (356 votes). Check out past polls.