For Programmers: Free Programming Magazines  


Home > Archive > PERL Miscellaneous > May 2004 > how to clear the terminal









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author how to clear the terminal
Robert Meyer

2004-05-17, 1:38 pm

Hi NG,

sorry for my question, but i didn't found anything about how to clear the
terminal.
I try `clear`; in the script but this does not work.

Any ideas?

thx
Robert

--
There are only 10 types of people in the world:
Those who understand binary, and those who don't.
http://www.one-m.de
http://www.lugbz.org/documents/smart-questions_de.html

Ben Morrow

2004-05-17, 1:38 pm


Quoth Robert Meyer <egoist99NO@SPAMyahoo.de>:
> sorry for my question, but i didn't found anything about how to clear the
> terminal.
> I try `clear`; in the script but this does not work.


See Term::ANSIScreen from CPAN.

Ben

--
Like all men in Babylon I have been a proconsul; like all, a slave ... During
one lunar year, I have been declared invisible; I shrieked and was not heard,
I stole my bread and was not decapitated.
~ ben@morrow.me.uk ~ Jorge Luis Borges, 'The Babylon Lottery'
Robert Meyer

2004-05-18, 7:31 am

Am Mon, 17 May 2004 16:41:48 +0000 schrieb Ben Morrow:

>
> Quoth Robert Meyer <egoist99NO@SPAMyahoo.de>:
>
> See Term::ANSIScreen from CPAN.
>
> Ben



thx - it works fine

greets
Robert

--
There are only 10 types of people in the world:
Those who understand binary, and those who don't.
http://www.one-m.de
http://www.lugbz.org/documents/smart-questions_de.html

Bryan Castillo

2004-05-18, 11:32 am

Robert Meyer <egoist99NO@SPAMyahoo.de> wrote in message news:<pan.2004.05.17.16.16.02.824151@SPAMyahoo.de>...
> Hi NG,
>
> sorry for my question, but i didn't found anything about how to clear the
> terminal.
> I try `clear`; in the script but this does not work.
>


system("clear"); # would probably work for you

I imagine that the clear command is printing ansi control characters
to stdout, so the back ticks would keep the control characters from
actually going to the terminal.

> Any ideas?
>
> thx
> Robert

Bob

2004-05-18, 12:35 pm

On 05/18/04 10:23 Bryan Castillo spoke:[color=darkred]
> Robert Meyer <egoist99NO@SPAMyahoo.de> wrote in message news:<pan.2004.05.17.16.16.02.824151@SPAMyahoo.de>...
>
>
>
> system("clear"); # would probably work for you
>
> I imagine that the clear command is printing ansi control characters
> to stdout, so the back ticks would keep the control characters from
> actually going to the terminal.
>
>

Is there a cross OS solution?


--
-------------------------------------------------------
Remove .NOSPAM from my email address to reply directly.
Hobbit HK

2004-05-18, 3:42 pm

Robert Meyer <egoist99NO@SPAMyahoo.de> wrote in message news:<pan.2004.05.17.16.16.02.824151@SPAMyahoo.de>...
> Hi NG,
>
> sorry for my question, but i didn't found anything about how to clear the
> terminal.
> I try `clear`; in the script but this does not work.
>


You can always print the output of clear:
print `clear`;

> Any ideas?
>
> thx
> Robert

Tintin

2004-05-19, 7:32 am


"Hobbit HK" <hobbit_hk@hotmail.com> wrote in message
news:22ee5d47.0405181104.68b85c89@posting.google.com...
> Robert Meyer <egoist99NO@SPAMyahoo.de> wrote in message

news:<pan.2004.05.17.16.16.02.824151@SPAMyahoo.de>...
the[color=darkred]
>
> You can always print the output of clear:
> print `clear`;


That's about as useful as doing

echo `ls -l`


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com