Oops, typo monster struck: that should be "unless $relaunched, spawn" below. Also want to then exit original instance to let new instance carry it from there.
> -----Original Message----- > From: Andrew Timberlake-Newell [mailto:Andrew.Timberlake- > [EMAIL PROTECTED] > Sent: Friday, December 31, 2004 6:59 PM > To: 'Lasher, Brian' > Cc: 'perl-win32-users@listserv.ActiveState.com' > Subject: RE: black box > > > > Is there any way to keep the "black command-prompt looking box" from > > > popping up when executing perl script on win 32 platform? > > > > Have got several replies saying use wperl.... > > Another option: Win32::Process > > For instance, you might have your program look for a command line option, > as in: > > my $relaunched = grep(/^-relaunch$/, @ARGV); > > Then, if $relaunched, spawn a new instance of the same program with > Win32::Process adding '-relaunch' into your argument list. > > That spawning might be something similar to: > > Win32::Process::Create(my $process, > 'C:/Perl/bin/perl.exe', > sprintf('perl "%s" %s', $0, $options), > 0, > DETACHED_PROCESS, > $path); > > ...although the above will definitely require modification to your specs. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs