in reply to Hiding DOS windows that accompany TK
I borrowed this from the Perl Cookbook a while ago:
use strict; use warnings; use Win32; use Win32::Process; my $program = shift @ARGV or die "Usage: loader.pl program\n"; Win32::Process::Create($Win32::Process::Create::ProcessObj, 'd:\strawberry\perl\bin\perl.exe', #or wherever perl.exe is locate +d "perl.exe $program", 0, DETACHED_PROCESS, '.') or die print_error(); sub print_error { return Win32::FormatMessage( Win32::GetLastError() ); }
"A core tenant of the greater Perl philosophy is to trust that the developer knows enough to solve the problem" - Jay Shirley, A case for Catalyst.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Hiding DOS windows that accompany TK
by Popcorn Dave (Abbot) on Dec 08, 2008 at 19:06 UTC | |
by Erez (Priest) on Dec 09, 2008 at 08:35 UTC | |
by Popcorn Dave (Abbot) on Dec 09, 2008 at 17:07 UTC |
In Section
Seekers of Perl Wisdom