Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2017-06-25 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (564 votes). Check out past polls.