There is no way to have a single process connected to 2 cli windows simulaneously under Win32. You could create a gui style window with either native calls or one of the gui toolkits.

It is possible to have multiple screen buffers associated with a single cli window. You can do this with Win32::Console. You then only need arrange for some key sequence to be recognised and trigger switching between the 2 or more screen buffers.

You could take this a stage further and package it up using a tied filehandle to represent the "alternate console" so that you could use Perl's standard IO to write to the multiple consoles.

If you don't like the idea of having to use a keysequence to allow you to view the various screens, you could take that a step further. Size the window to 160 x 48 and draw the different 'screens' in different portions of the one real screen. In fact, I frequently use an 8 point font in my console sessions which gives me a 250 x 120 screen, which could hold 15 80x24 sessions concurrently.


Examine what is said, not who speaks.
Silence betokens consent.
Love the truth but pardon error.

In reply to Re: perl opening a new command line window by BrowserUk
in thread perl opening a new command line window by bdalzell

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.