in reply to Re: Re: The difference between [system] and `backticks` and [qx//] (on win32)
in thread The difference between [system] and `backticks` and [qx//] (on win32)

Your right! `cls` does indeed return an 'escape sequence' to perl. In this case, ascii 12 (form feed). I'm guessing that is a throw-over from DOS when clearing the screen was considered the glass-teletype equivalent of throwing a new page on a printer.
If I remember correctly, this is still how it is done on an OpenVMS system. The command to "clear the screen" is something like
$ PRINT NL:

This has the effect of outputting the NULL device to the screen. Have no idea how that would look using Perl, never got the opportunity to use Perl on OpenVMS (if anyone has a spare Alpha workstation gathering dust though.... :-)


"Ex libris un peut de tout"
  • Comment on Re: Re: Re: The difference between [system] and `backticks` and [qx//] (on win32)

Replies are listed 'Best First'.
Re: Re: Re: Re: The difference between [system] and `backticks` and [qx//] (on win32)
by seanbo (Chaplain) on Oct 14, 2003 at 15:43 UTC
    Close...the command PRINT NL: actually won't clear the screen. NL: is the null device in VMS and if you print it, it merely drops to the next prompt. What you'd really want is TYPE/PAGE NL:


    perl -e 'print reverse qw/o b n a e s/;'
      That's right. It's been a while since I did anything with VMS. Thanks.


      "Ex libris un peut de tout"