io has asked for the wisdom of the Perl Monks concerning the following question:
This works just fine. It's only that every loop the progress is printed on a new line (in the console). Much nicer would be if it would stay on the same place all the time. I hope you know what I mean. I think I saw the CPAN shell do this. Many console applications do this too, like rpm. Thanks very much.while ($total < $length) { $read = read($remote, $buffer, int($length/100)); $stuff .= $buffer; $total += $read; $done = sprintf("%.2f", $total/($length/100)); print "$done%\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: printing in a specific area of the console
by Masem (Monsignor) on Feb 17, 2002 at 20:07 UTC | |
Re: printing in a specific area of the console
by stephen (Priest) on Feb 17, 2002 at 19:55 UTC | |
Re: printing in a specific area of the console
by belg4mit (Prior) on Feb 17, 2002 at 19:57 UTC | |
Re: printing in a specific area of the console
by steves (Curate) on Feb 17, 2002 at 20:14 UTC | |
Re: printing in a specific area of the console
by Amoe (Friar) on Feb 17, 2002 at 21:07 UTC | |
Re: printing in a specific area of the console
by Speedy (Monk) on Feb 17, 2002 at 20:01 UTC | |
Re: printing in a specific area of the console
by gellyfish (Monsignor) on Feb 17, 2002 at 21:55 UTC | |
Re: printing in a specific area of the console
by io (Scribe) on Feb 18, 2002 at 11:33 UTC |