in reply to Re: Multi-line Status while script is running
in thread Multi-line Status while script is running
Using "\e[K" seems to be better with my experience since there is no need to figure out the length of the previous output.
The thing I think I haven't figured out with ncurses/term::cap/term::screen/etc is that I don't know how to determine the current line/row of the screen I am currently on. I can put text anyplace any want easily but can't get seem to understand how to determine the current line/row.my @dirs = map {chomp; $_} <DATA>; local $| = 1; my $i = 0; for my $dir (@dirs) { $i++; my $output = int($i / @dirs * 100) . "% ($i/" . @dirs . ")"; print "\e[K<-- $output complete, $dir -->\r"; sleep 1; } print "\n";
Am I just missing the existing function to do that?
|
|---|