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