Thursday, December 13, 2007

Hide Console Windows in Perl

Here's a nice snippet if you want to hide console windows that open up when calling utilities or commands using backticks. Perl, being an excellent duct-tape language, makes this easy, just add this snippet at the bottom of your code:

BEGIN
{
    Win32::SetChildShowWindow(0)
        if defined &Win32::SetChildShowWindow;
}

0 comments: