<?xml version="1.0" encoding="windows-1252"?>
<node id="271330" title="Win32::Start Perl/Tk Script Without Annoying DOS Window" created="2003-07-03 19:48:14" updated="2005-06-14 05:33:38">
<type id="1748">
sourcecode</type>
<author id="243154">
PERLscienceman</author>
<data>
<field name="doctext">
&lt;code&gt;
#!/usr/bin/perl -w

use strict;
use Win32;
use Win32::Process;

# Create the process object.

Win32::Process::Create($Win32::Process::Create::ProcessObj,
     "C:\\perl\\bin\\Perl.exe",              # Where Perl is located.
     "perl c:\\yourdir\\yourTKscript.pl",    #
     0,                                      # Don't Inherit
     DETACHED_PROCESS,                       #
     ".") or                                 # current directory
     die print_error();			     # 
     sub print_error(){			     #
         return Win32::FormatMessage(Win32::GetLastError() );
         }

$Win32::Process::Create::ProcessObj -&gt; Resume();
&lt;/code&gt;</field>
<field name="codedescription">
Have you ever wanted to run a Perl/Tk Script on Win32
without that pesky DOS window?  This is the script.
I found this in O'Reilly's Perl Cookbook, 1st Edition;
Section 15.17, pp544-545. With a little tweak (their
was an apparent typo in the book which caused it initially
not to work). This script allows for an associated process,
in this case, yourTKscript.pl, to run without a DOS window.
I found this script to be quite useful.
</field>
<field name="codecategory">
GUI Programming</field>
<field name="codeauthor">
Jay Madigan (PERLscienceman)
&lt;perlsciman@hotmail.com&gt;</field>
</data>
</node>
