Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

run3

Status
Not open for further replies.

bylina

Technical User
Oct 30, 2007
1
CZ
Hi,

I have a problem with IPC Run3.

I use it successfully on Unix but cannot make it run on Windows.

Would you please let me know what I do wrong in the following simple script:

################################################
#!/usr/bin/env perl -w

use strict;
use IPC::Run3;

my @cmd = ("copy", "small.txt", "big.txt");

my $rc = 0;
$rc = run3(\@cmd, \undef, "output.txt", "errors.txt");
print "$rc\n";
###############################################

I always get the following error:

Can't spawn "cmd.exe": No such file or directory at C:\wss\cdev2\wssuite\components\trm\fk71\perl\5.8.6\lib/IPC/Run3.pm line 497.

 
I've never used Run3 but possibly cmd.exe is not in the expected path? Maybe poke around the .pm file and see if the path is hard code or if it is using the user path. You might hard code it if needed.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top