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

Hi all, I run a commandline application inside a GUI application with open and get its output with a pipe:
my $pid = open($mypipe, '-|', "$cmd $host ");
This also opens the black console window. How can I make this window not open?
Thanks!!

Replies are listed 'Best First'.
Re: Closing console window in Windows
by lamprecht (Friar) on Jun 12, 2009 at 19:04 UTC
    Hi,

    maybe adding

    use Win32; Win32::SetChildShowWindow(Win32::SW_HIDE);
    helps?

    Cheers, Christoph
      Thanks Christoph, it worked!!
Re: Closing console window in Windows
by ikegami (Patriarch) on Jun 12, 2009 at 19:04 UTC
    Launch the program via start. IIRC, one of the options avoids the creation of a console.

    Update: start /wait /b (for background). There's also start /wait /min if you want the window minimised instead of absent.