develooper Front page | perl.beginners | Postings from January 2002

Re: Print / overwrite line

From:
Michael R. Wolf
Date:
January 6, 2002 00:27
Subject:
Re: Print / overwrite line
Message ID:
wkwuyvq3yr.fsf@att.net
ghawk@eskimo.com (Gary Hawkins) writes:

> How can I clear a line before replacing it?

If you are trying to output to a terminal, this is probably
a termcap question.  Try looking for "clear to end of line"
in a termio or termcap module.  It will necessarily depend
on they kind of terminal you have, but the function call
should hide that from you.


> Am doing \r and overwriting,

\r is literally "carriage return" from the days of paper
terminals when the thing that wrote the type (literlly the
typewriter) was carried on a carriage.  It works on CRT's
when followed by line-feed (what used to advance the paper),
but without the line-feed, the characters already on the
line remain.

-- 
Michael R. Wolf
    All mammals learn by playing!
        MichaelRunningWolf@att.net



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About