Ned Cunningham wrote:
> 
> HI all.

Hello,

> Can anybody tell me how to execute a command "remotely" in  a Perl script from
> a different directory. Please keep in mind I am asking what I want, not what you
> think I meant to say.
> 
> I need to:
> 
> ('cd /d e:\ned\nedsdir`);

You are running the 'cd' command in a child process which will change to
the directory specified and then lose the change when the child exits. 
Also, unless your path has actual newline characters in it that is not
going to work.  Use perl's built-in chdir() function.

chdir 'e:/ned/nedsdir' or die "Cannot chdir to e:/ned/nedsdir $!";

perldoc -f chdir

> (`runprogram.exe -option - option -option`);




John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to