Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: wget style progress bar

by artist (Parson)
on Mar 16, 2003 at 17:01 UTC ( [id://243496]=note: print w/replies, xml ) Need Help??


in reply to wget style progress bar

Very neat application tachyon.
Now How I can integrate it to see the progress of my subroutine ?
my routine = sub { open OUT, ">file"; foreach (1..200){ print OUT "HelloWorld\n" }; sleep 1; }; print_progress_bar($routine);

artist

Replies are listed 'Best First'.
Re^2: wget style progress bar
by Aristotle (Chancellor) on Mar 16, 2003 at 19:13 UTC
    I'm not sure what you're asking for. This, perhaps?
    sub foo { open my $fh, ">", "file"; foreach (1..200){ print OUT "HelloWorld\n"; print progress_bar($_, 200, 25, '='); } sleep 1; }

    Makeshifts last the longest.

      Almost similar, but I am looking for functionality where I can call and mesure the progress for the routine as it is executed. So the line 'print progress_bar' should be outside the 'foo' here. I should have independent way of measuring the progress of the subroutine. I guess the only way to achive that is to implement the call back routines or implement threads .

      artist

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-24 10:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found