Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm asking a question for perl (for Windows, not Unix or CGI). How can I clear the ms-dos screen?

Replies are listed 'Best First'.
RE: Clearing Screen
by outcast (Monk) on Mar 14, 2000 at 05:28 UTC
    print chr(27)."[5;5H".chr(27)."[J"; i know this works with unix but this using just regular ascii. i should work have not tried it.
Re: Clearing Screen
by Anonymous Monk on Mar 14, 2000 at 17:08 UTC
    print "\n" x 50;
    I know this is cheesy but it would probably work for most cli's... without requiring a proprietary system call with the tradeoff that you assume the height of the term... 50 is probably pretty safe for most text-based applications. I was just trying to think of a different way to accomplish the desired result. Hope it helps. TTFN & Shalom.

    -PipTigger
RE: Clearing Screen
by outcast (Monk) on Mar 14, 2000 at 05:28 UTC
    print chr(27)."[5;5H".chr(27)."[J"; i know this works with unix but this using just regular ascii. i should work have not tried it.
Re: Clearing Screen
by Anonymous Monk on Dec 17, 2001 at 20:30 UTC
    why does print `cls`; in windows return the symbol for women? rev aaron apepelis@yahoo.com
      here's two e-mails on it...
      first written:
      Here's the difference between the 2:
       
      when using the back ticks, the output gets returned and is not directed to the standard output (the command
      prompt)
       
      i.e: 
       
      $user = `whoami`;
       
      The variable $user is set to llam .
       
      when using the system(command), the output gets directed and displayed to the standard output (the command 
      prompt) and a value of 0 is returned if the command was accepted without any errors
       
      i.e:
       
      $user = system("whoami");
       
      The variable $user is set to 0 BUT llam is displayed on the command prompt.
      
      and another that I sent:
      but the "women symbol" is coming out as 0x0C
      0000 1101 which is being decoded by your default FONT.
      change your dafult font and it prints out other things.
      http://www.erg.abdn.ac.uk/users/gorry/eg2069/ascii-table.pdf
      in arial it's a bullet.
      make sense? 
      
Re: Clearing Screen
by Anonymous Monk on Mar 14, 2000 at 18:59 UTC
    Thank you all
Re: Clearing Screen
by Anonymous Monk on Mar 14, 2000 at 00:53 UTC
    `cls`
Re: Clearing Screen
by Anonymous Monk on Mar 14, 2000 at 04:07 UTC