Paul Harwood wrote: > Is there a simple way to print over an existing line? > > For example: I would like to have a progress report that > reads 10%, 20% > etc. I don't want to print a new line each time. I want to write over > the existing line and have it update as it goes. > > --Paul
Use "\r" to move to the beginning of the current line (depending on the capabilities of your terminal). Also unbuffer STDOUT. Something like this: $| = 1; for (1 .. 5) { print "\rStep $_"; sleep 1; } print "\rFinished.\n"; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]