in reply to Re^2: More Perl/Tk Queries with Spawned Processes under Win32
in thread More Perl/Tk Queries with Spawned Processes under Win32

You could allow the shell to do the path resolution for you:

Win32::Process::Create( $obj, "C:\\windows\\system32\\cmd.exe", 'cmd /c notepad somefile', 0, NORMAL_PRIORITY_CLASS, '.' ) or die $^E;;

Or more simply use system

## Run the command asyncronously with shell command resolution $pid = system 1, 'notepad'; .... ## Do other stuff ## Retrieve the exit code waitpid $pid, 0; print 'command return status: ', $? >> 8;; command return status: 0

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
Lingua non convalesco, consenesco et abolesco. -- Rule 1 has a caveat! -- Who broke the cabal?
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.