sjwnih111 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Perl Monks, I am trying to spawn an executable using Win32::Job. I am using the command
$command = C:/users/me/progg.exe -c 1 -i $dir -o $result_dir -v $c_pat +h -t .25" $job->spawn($Config{"C:/Windows/System32/cmd.exe"}, $command);
However, the executable then throws an error that does not occur when I simply run
system($command);
I think that it may be a problem with the arguments not being read?

Replies are listed 'Best First'.
Re: Running executable with Win32::Job
by BrowserUk (Patriarch) on Nov 27, 2013 at 16:17 UTC

    What output do you get if you print this?:

    print $Config{"C:/Windows/System32/cmd.exe"};

    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      Having no space between pattern and following word is deprecated at w +in_job.pl line 67. Bareword found where operator expected at win_job.pl line 67, near "/W +indows/System32" (Missing operator before System32?) String found where operator expected at win_job.pl line 67, near "exe" +}"" syntax error at win_job.pl line 67, at EOF syntax error at win_job.pl line 67, near "/Windows/System32" Execution of win_job.pl aborted due to compilation errors.
        Actually, that was for
        print "config $Config{"C:/Windows/System32/cmd.exe"}";
         print $Config{"C:/Windows/System32/cmd.exe"} gives no output