IPC::Run won't run ... 
Author Message
 IPC::Run won't run ...

Say I have a directory "d" and an executable file "d/run",
and I want to run d/run while in d. But I don't want the
parent to change directories. I thought this would do the
trick:

  use IPC::Run 'run';
  run [ './run' ], init => sub { chdir 'd' };

But it doesn't. Running IPCRUNDEBUG=details ./test says
"file not found, child not run". I think this is a bug,
but be that as it may, this is a pretty natural thing
to want to do, so any way to accomplish it would be
most welcome. I tried fiddling--unsuccessfully--with
$ENV{PATH}, the path of run, etc, but don't want to
start with Cwd.



Sun, 18 Sep 2005 09:06:32 GMT  
 IPC::Run won't run ...

Quote:

> Say I have a directory "d" and an executable file "d/run",
> and I want to run d/run while in d. But I don't want the
> parent to change directories. I thought this would do the
> trick:

>   use IPC::Run 'run';
>   run [ './run' ], init => sub { chdir 'd' };

> But it doesn't. Running IPCRUNDEBUG=details ./test says
> "file not found, child not run". I think this is a bug,
> but be that as it may, this is a pretty natural thing
> to want to do, so any way to accomplish it would be
> most welcome. I tried fiddling--unsuccessfully--with
> $ENV{PATH}, the path of run, etc, but don't want to
> start with Cwd.

Since IPC::Run passes the command string to the shell,
there should be nothing to stop you from specifying
two commands separated by a semicolon.  The following
seems to work for me:


/usr/home/roam/txt

This is Perl 5.8.0 on FreeBSD, IPC::Run 0.74.

G'luck,
Peter



Mon, 26 Sep 2005 22:42:29 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Please Help:My script runs on win32, it won't run on Unix

2. My script runs on win32, it won't run on Unix

3. Please Help: My script runs on win32, it won't run on Unix

4. Simple replacement for IPC::Run run() function

5. Simple replacement for IPC::Run run() function

6. HELP: need simple replacement for IPC::Run run() function

7. perl won't run(can't set locale)

8. ParallelUA won't run from the web?!

9. perl 4 script that won't run under perl 5

10. why won't this short script run?

11. Perl CGI scripts won't run without -w switch (under Apache 1.3.x)

12. Perl scripts won't run on Linux

 

 
Powered by phpBB® Forum Software