In article <Sc********************@rogers.com>, dave
<da**@internetnewsgroup.com> wrote:
Hi all,
New to Perl. I saw a perl program (not source code) output formatted text on
the terminal in the way,
# first time, output a line
23 11 1234
# then, update 11 of above line with 22 at same place on screen
23 22 1234
so, there is no position change for above two lines, but the contents
updated. How to do this in Perl?
The simple way is to begin your output lines with "\r", do not end them
with the normal "\n", and write out the entire line each time. You
might add a few spaces at the end to move the cursor over and erase any
characters left over from an earlier, longer line. You should also turn
off output buffering with "$| = 1;".
For more complex schemes, use Curses as Jürgen suggested.
FYI: this newsgroup is defunct. Try comp.lang.perl.misc in the future.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---