Suppress console windows when using backticks

Posted by troyt on 2006-07-06 10:34
OS: Windows | Product: Perl Dev Kit | tags: gui perlapp

How do I stop console windows from popping up when i call commands in backticks?


Using perlapp's --gui option should hide normal perl command line output, but system commands called within backticks may still open command line windows. To suppress this, try adding the following block to your script:

    Win32::SetChildShowWindow(0) if defined &Win32::SetChildShowWindow;

This should work using ActivePerl version 632 or later.