clear console in perl

yli
2008-11-26
2013-05-20
  • yli
    yli
    2008-11-26

    Hi all,

    I am using Linux EPIC and try to clear the console by the following perl code:
       $ENV{'TERM'}="xterm";
       $clear_string = `clear`;
       print $clear_string;

    It works well on Linux terminal window, but not for EPIC console (only saw strange characters).

    Thank you so much for helping!
    yli

     
    • Jan Ploski
      Jan Ploski
      2008-11-26

      The standard Console view of Eclipse is not a full-fledged terminal emulator, so it does not understand the control sequences emitted by clear.

      If you really want 'clear' or stuff like 'ncurses' to work, you should installi in addition to EPIC the Remote System Explorer (which is an official Eclipse project). It has a Terminals view where you can enter shell commands (e.g. to start Perl scripts) and where the 'clear' command should work as expected.

       
      • yli
        yli
        2008-11-26

        Thanks a lot for replying and I will try Remote System Explorer.