in reply to Re: output on top of old output
in thread output on top of old output
because, of course, you're only backspacing over one character. To avoid extra logic to figure out how many spaces to go back, you can just go to the beginning of the line with \r:perl -e '$|++;for(1..15){ print $_;sleep 1; print "\b"} # prints: 1111115
Which one is "better" depends on your desired use, obviously.
Addendum: Ooog, slow typing today.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: output on top of old output
by cog (Parson) on Mar 22, 2005 at 15:46 UTC | |
by Tanktalus (Canon) on Mar 22, 2005 at 16:27 UTC | |
|
Re^3: output on top of old output
by sh1tn (Priest) on Mar 22, 2005 at 16:15 UTC |